After the automatic reconnexion of the client MQTT, it does not receive any message, the subscription is not backed up knowing that the cleanSession = FALSE.
I need to know if Live Objects Orange support cleanSession = FALSE ??
Thanks in advance !
Live Objects doesn't use MQTT persistent sessions. You have to subscribe at each reconnection. If you want that your client gets messages that it misses offline, you juste have to use fifo topics. So that messages are kept in the fifo until a client consume them.
Best regards
Related
When my web app subscribes to a Redis channel (mostly on Application_Start), it should automatically load the current channel content, but not wait for the next publish within this channel.
I couldn't find any way to achieve this - but as this "problem" appears to be so common and trivial I guess there must be an easy solution for this?
In the web app I'm using StackExchange.Redis (in case that's relevant). Who can help? Thx in advance!
The answer is no, there is no option to do this using Redis pub/sub functionality, Redis don't actually store messages which being published to the channel, so you can't retrieve them when you connect to channel.
Take a look at RabbitMQ with their persistent queues and message acknowledgements, which they have out of the box.
As there's obviously no comfortable option available in Redis, I'm now publishing the channel message also as a regular key-value. So the clients take it from key-value store before subscribing to the channel.
I am creating an iOS app in which I have used mosquito library for Integrating Active MQ.
Everything is working fine except,I get all the messages again when I reconnect with new client id.
cleanSession flag is set to false;
Any help would be appreciated.
I suppose you are talking about a new client id for each time you connect?
Check the retain flag of the publish messages. If it is set to true the broker will retain the messages and since you are connecting with a new client id they would be sent to your client given that you subscribe to the certain topics.
Also to quote mosquitto.org about cleanSession.
If clean session is set to false, then the connection is treated as durable. This means that when the client disconnects, any subscriptions it has will remain and any subsequent QoS 1 or 2 messages will be stored until it connects again in the future.
I should say that the question seems a little ill-informed, would be better to have a better explanation for a better and spot on answer.
I would like to know if there is any implication when using concurrentStoreAndDispatchQueues = true with persistent messages and needed guaranty order.
We are using Kaha, with persistent messages and we need guaranty order, we re using also JMSXGroupID.
Is there any implication setting this to true, is it possible lost of messages?
Any help or clarification about the property concurrentStoreAndDispatchTopics will be helpful.
Thanks .
I think concurrentStoreAndDispatchQueues option improves the performance of message consumption from ActiveMQ queues. But it is less reliable than synchronous store and dispatch.
In case of concurrent store and dispatch broker does not wait for acknowledgments from consumer or message storage. It dispatches the message to consumers and to message storage thread in parallel and immediately sends back the acknowledgment to message producers.
So there is chance of messages being lost in case of message storage disk issues.
Please refer the documentation from Fuse ESB which explains the similar concept -
https://access.redhat.com/documentation/en-US/Fuse_ESB/4.4.1/html/ActiveMQ_Tuning_Guide/files/PersTuning-SerialToDisk.html
I'm exploring using Rebus and RabbitMQ together to cover a couple of different scenarios.
Scenario A
I want to be able to have a central server push notifications to a list of arbitrary subscribers, but the messages don't need to be durable or persisted. If a subscriber is connected, they should receive a notification, but if they disconnect, then there's no need to queue a message for any client.
In my tests so far, I'm able to get a producer and consumer communicating with UseRabbitMqInOneWayMode() and ManageSubscriptions(), however, the messages build up in RabbitMQ when there are no subscribers, or if a subscriber disconnects. I've tried setting the header to false for RabbitMqMessageQueue.InternalHeaders.MessageDurability, but it has no effect. I suspect it's because the default queue that Rebus sets up is durable. Is there a way within Rebus to control this behavior?
Scenario B
As clients come online, or disconnect, I'd like to setup a request/reply channel between clients. For example:
Client A and client B connect
Client A will send a message requesting data that only Client B has. Client B gathers the info, and replies back to A.
Client B disconnects
Client A requests data from Client B, and should receive an error because B is no longer available.
What's the recommended config for this case?
Thanks.
I'm not an expert on RabbitMQ, and so the Rebus support for RabbitMQ mostly comes from community contributions.
I think scenario A can be solved pretty easily though by using the RabbitMQ concept of "auto-delete queues", which you can configure with Rebus like this:
Configure.With(...)
.Transport(t => t.UseRabbitMq(...)
.ManageSubscriptions()
.AutoDeleteInputQueue())
.(..)
which causes RabbitMQ to delete the queue when the last subscriber disconnects.
In scenario B it sounds to me like you would be better off with something that is meant for synchronous communication, because that's what you really want. I suggest you use HTTP because it's pretty good at doing request/reply :)
How long will messages published to a Redis channel stay there ? Also, is there is a way to configure the max. lifetime of a message per channel ? Is there a way to control the channel size or does the channel continues to store messages as long as the Redis server has free memory ?
Redis pub/sub doesn't persist published messages. What you are looking for seems more like a message queue which can be implemented using a combination of pub/sub and lists. For more information see pattern sections in RPOPLPUSH command.