----- Original Message -----
> From: "Greg Oliver" <[email protected]>
> To: [email protected]
> Sent: Friday, January 20, 2017 6:56:08 PM
> Subject: filtering message stream
>
> Using Python. Proton 0.16.0.
>
> Would like to receive messages from an Azure Event Hub using proton. Need to
> set message filters based on offset or timestamp.
>
> I've read about adding annotations to a request such as: x-opt-offset,
> x-opt-enqueued-time, x-opt-sequence-number.
>
> But no idea how to set these values, especially using Python.
>
> Is there a book or other resource with examples?
>
Hi Greg,
In python you can access/set the message annotations via the annotation
property of the proton.Message class.
You should set this to a map which uses the 'x-opt...' values as keys before
sending the message. Example:
import proton
m = proton.Message()
m.annotations = {'x-opt-offset': '100', .... }
caveat: totally untested, just suggesting this from what I've read here:
https://amqpnetlite.codeplex.com/wikipage?title=Using%20Amqp.Net%20Lite%20with%20Azure%20Server%20Bus%20Event%20Hub
-K
> Thanks,
> Greg
>
--
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]