activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xbhanu <xbh...@gmail.com>
Subject Re: Problems with the AMQP python messenger API
Date Thu, 12 Dec 2013 16:07:54 GMT
Aha !! Works like a charm now. Thanks Gordon. It would be good if some one
puts this incoming_window thing along with some documentation in the proton
sender receiver examples as
well.(qpid-proton-0.5/examples/messenger/py/recv.py).

One more thing, I dont think there is a concept of durable topic
subscriptions in AMQP ? True right ?


On Thu, Dec 12, 2013 at 7:57 PM, Gordon Sim-2 [via ActiveMQ] <
ml-node+s2283324n4675461h20@n4.nabble.com> wrote:

> On 12/12/2013 01:33 PM, xbhanu wrote:
> > Yes, and infact i am doing exactly this. But the accept call has no
> effect
> > it seems.
>
> You also need to set the incoming message window, e.g.
>
> >      messenger = Messenger()
> >      messenger.start()
>
>         messenger.incoming_window = 10
>
> >     messenger.subscribe(address)
> >
> >      message = Message()
> >
> >      while should_run:
> >          messenger.recv()
> >          while messenger.incoming:
> >              try:
> >                  messenger.get(message)
> >                  messenger.accept()
> >              except Exception, e:
> >                  print "Exception occurred while retrieving the message:
> " +
> > e
> >              else:
> >                  print "Destination: " + message.address + "\n" + \
> >                      "Properties: " + str(message.properties) + "\n" + \
> >                      "Body: " + str(message.body) + "\n"
> >
> >     messenger.stop()
>
>
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://activemq.2283324.n4.nabble.com/Problems-with-the-AMQP-python-messenger-API-tp4675451p4675461.html
>  To unsubscribe from Problems with the AMQP python messenger API, click
> here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4675451&code=eGJoYW51QGdtYWlsLmNvbXw0Njc1NDUxfC04NDE4NTMxMTk=>
> .
> NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
Bhanu Choudhary
Senior Member Technical,
D E Shaw India Software Ltd.
Hyderabad.




--
View this message in context: http://activemq.2283324.n4.nabble.com/Problems-with-the-AMQP-python-messenger-API-tp4675451p4675468.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message