🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
Cache request on python
I found that solace PubSub+ 1.6.0 support cache
But I follow this
step to do cache requestI can not receive the cache message from direct_receiver.receive_async(MessageHandlerExample())
but I can use DirectMessageReceiver.add_subscription to get message(CacheStatus.LIVE).
and I also develope C# code it allowed call SendCacheRequest to receive cacehe message.
any one use python to call cache successlly?
Thanks
Best Answer
Answers
-
Hi Marc,
I do try that how_to_request_cached_data.py but it still can't receive cache data.
what detail settings should I check out?
my python code flow is
1.MessagingService.connect()
2.message_receiver = MessagingService.create_direct_message_receiver_builder().build()3.message_receiver.start()
4.message_receiver.receive_async(MyMessageHandler())
call cache request
5.HowToUseCachedMessageSubscriptionRequests().create_subscription_request_to_receive_latest_message(message_receiver , "subexpress", "cache name", 3000)
or create_subscription_request_to_receive_cached_and_live_messages,or create_cached_subscription_with_more_options,
or create_subscription_to_receiver_only_cached_messages,
6.do another message_receiver.add_subscription
is it correct?0