-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ttl example #69
Comments
I'll provide you with an example in a day or two. |
thanks this would be awesome!
…On Mon, Mar 4, 2019 at 9:25 PM Erik Olof Gunnar Andersson < ***@***.***> wrote:
I'll provide you with an example in a day or two.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAA_7MAUMJtACIRV73JeWonetFF-DS-2ks5vTf-zgaJpZM4bas98>
.
--
------------------------------------------------------------
Lead Developer - Fiehnlab, UC Davis
gert wohlgemuth
work:
http://fiehnlab.ucdavis.edu/staff/wohlgemuth
phone:
530 665 9477
coding blog:
http://codingandmore.blogspot.com
linkedin:
http://www.linkedin.com/profile/view?id=28611299&trk=tab_pro
|
This example would set a queue ttl of 5000ms, but the message ttl lower at 600ms.
|
sadly still doesn't work. The second I specify any form of properties, it
stops sending messages. If i keep the properties out/None it works fine.
…On Thu, Mar 7, 2019 at 7:01 PM Erik Olof Gunnar Andersson < ***@***.***> wrote:
This example would set a queue ttl of 5000ms, but the message ttl lower at
600ms.
def publish_message(channel):
# Declare the Queue, 'simple_queue' with a message ttl of 5000ms.
channel.queue.declare('simple_queue', arguments={
'x-message-ttl': 5000,
})
# Create the message with a ttl of 600ms.
message = Message.create(channel, 'Hello World!',
properties={"expiration": "600"})
# Publish the message to a queue called, 'simple_queue'.
message.publish('simple_queue')
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAA_7POcDEyIv5Ebu_KOYP9kNFz6CVqvks5vUdKAgaJpZM4bas98>
.
--
------------------------------------------------------------
Lead Developer - Fiehnlab, UC Davis
gert wohlgemuth
work:
http://fiehnlab.ucdavis.edu/staff/wohlgemuth
phone:
530 665 9477
coding blog:
http://codingandmore.blogspot.com
linkedin:
http://www.linkedin.com/profile/view?id=28611299&trk=tab_pro
|
ok belay this, was a coding error on my side, for some reason my TTL got
set to 0, due to a logic error. TTL works fine now.
thanks for your help!
On Thu, Mar 7, 2019 at 8:50 PM Gert Wohlgemuth <[email protected]>
wrote:
… sadly still doesn't work. The second I specify any form of properties, it
stops sending messages. If i keep the properties out/None it works fine.
On Thu, Mar 7, 2019 at 7:01 PM Erik Olof Gunnar Andersson <
***@***.***> wrote:
> This example would set a queue ttl of 5000ms, but the message ttl lower
> at 600ms.
>
> def publish_message(channel):
> # Declare the Queue, 'simple_queue' with a message ttl of 5000ms.
> channel.queue.declare('simple_queue', arguments={
> 'x-message-ttl': 5000,
> })
>
> # Create the message with a ttl of 600ms.
> message = Message.create(channel, 'Hello World!',
> properties={"expiration": "600"})
>
> # Publish the message to a queue called, 'simple_queue'.
> message.publish('simple_queue')
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#69 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAA_7POcDEyIv5Ebu_KOYP9kNFz6CVqvks5vUdKAgaJpZM4bas98>
> .
>
--
------------------------------------------------------------
Lead Developer - Fiehnlab, UC Davis
gert wohlgemuth
work:
http://fiehnlab.ucdavis.edu/staff/wohlgemuth
phone:
530 665 9477
coding blog:
http://codingandmore.blogspot.com
linkedin:
http://www.linkedin.com/profile/view?id=28611299&trk=tab_pro
--
------------------------------------------------------------
Lead Developer - Fiehnlab, UC Davis
gert wohlgemuth
work:
http://fiehnlab.ucdavis.edu/staff/wohlgemuth
phone:
530 665 9477
coding blog:
http://codingandmore.blogspot.com
linkedin:
http://www.linkedin.com/profile/view?id=28611299&trk=tab_pro
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you for your great work. Would you be able to provide an example how to send a message to a queue with a defined TTL?
I would like to set the ttl on the message it self, since different messages could have different TTL's
kind regards
The text was updated successfully, but these errors were encountered: