I need to send Azure IoT Hub events based on message type i.e. telemetry, state and health messages. Now I want to send these to 3 event hubs i.e telemetry message to go to first event hub, health to second event hub and state to 3rd event hub.
The issue I see in this approach is the ordering of events. Let's say for deviceID A telemetry event goes to event hub1, and state event goes to event hub 2. How can I make sure the consumer gets these 2 messages in order.
Note:- I don't want to use a single event hub as it will overload the consumer with irrelevant messages.
Related
Both the Solace queue and my program are subscribing to #LOG/INFO/SUB_ADD/DEVICE/ID/123.
When a new device which connects and subscribe to DEVICE/ID/123, both of them can successfully receive the subscribe event.
But, if I set subscription as #LOG/INFO/SUB_ADD/DEVICE/ID/>, only the solace queue receives the event.
Why can't my program receive the subscription event?
The problem persists even after my program sets it's subscription to #LOG/>.
One possible problem here is that there is an ACL rule preventing your application to subscribe to one or more topics in #LOG/INFO/SUB_ADD/DEVICE/ID/>. This can be easily verified with show log acl subscribe-topic.
If this is not the case, please revert back with the CLI outputs of show client <client-name> stats detail and show client <client-name> subscriptions to look further into the issue.
We wanna make a function that once a device connect and subscribe to solace,we will publish a topic to it.we want to know what's the event that a device connect to solace and subscribe to solace?which chapter we can refer to.Thanks
When a client connects to Solace, there will be a CLIENT_CLIENT_CONNECT event raised in the event log. If you would like to see the more information about this event and a list of all other events, you can refer to the SolOS-TR Event Reference Guide available on the Solace Developer Portal here:
https://sftp.solacesystems.com/Portal_Docs/#page/SolOS-TR_Event_Reference_Guide/doc_start_event_ref.html#
There is no event generated in the event log when a client subscribes to a topic, as this can become very verbose. However, there is an option to publish a subscription event over the message bus. These events will be sent out on the Message VPN in which the event occurred. For more information about this, you can refer to Chapter 4 of the Message Bus and Events Management guide, available on the Solace Developer Portal here:
https://sftp.solacesystems.com/Portal_Docs/#page/Message_Bus_and_Events_Management/Subscribing_to_Message_Bus_Events.html#
Is there any way we can know when a consumer disconnects from a queue or when a queue is deleted?
The requirement is as follows:
I'm building a system in which multiple clients can subscribe to certain events from the system. All clients create their own queue and registers themselves with the system using some sort of authentication. The system, as the events are generated, filters the events and forwards them to clients who are eligible for them.
I have implemented a POC for most part of it and it works well. An issue that I'm not able to fix is that, if a client just disconnects from the queue (due to program termination or so), the registration still exists and the system keeps trying to push messages to that client.
So we would like to be notified when a client disconnects or a queue gets deleted so that we can remove that client's registration data and no longer push messages to him.
Let your publisher utilize Confirms (aka Publisher Acknowledgements) and make client queue be exclusive and transient, so only one client at a time will be consuming from one queue and after it disconnection it will be deleted.
If you publish message that get routed to only one queue and that queue gone (assume you utilize publisher confirms and publish message with mandatory flag set) publisher will be notified that message cannot be routed with that message returned back to it, so you can stop publishing messages.
For details see How Confirms Work section in RabbitMQ blog post "Introducing Publisher Confirms" and Confirms (aka Publisher Acknowledgements) official docs.
I have a single publisher application (PUB) which has N number of subscribers (SUB)
These subscribers need to be able to catch up if they are restarted, or fall down and miss messages.
We have implemented a simple event store that the publisher writes to.
We have implemented a CatchupService which can query the event store and send missed messages to the subscriber.
We have implemented in the subscriber a PUSH socket which sends a request for missed messages.
The subscriber also has a PULL socket which listens for missed messages on a seperate port.
The subscriber will:
Detect a gap
Send a request for missed messages to our CatchupService, the request also contains the address on which to send the results to.
The catchup service has a PULL socket on which it listens for requests
When the CatchupService receives a request it starts a worker thread which:
Gets the missed messages
Opens a PUSH socket connecting to the subscribers PULL socket
Sends the missed messages to the subscriber.
This seems to work quite well however we are unsure if we are using the right socket types for this sort of application. Are these correct or should be using a different pattern.
Sounds okay. Otherwise 0MQ is able to recovery from message loss when peers go offline for a short time. Take a look at the Socket Options and specifically option ZMQ_SNDHWM.
I don't know just how guaranteed the 0MQ recovery mechanisms are so maybe you're best to stay with what you've got, but it is something to be aware of.
I have a few problems listening to incoming invitetions,
1) onInvitationReceived is not called when an invite is received when app on (i registerInvitationListener to my gamesClient in onSignInSucceeded)
2) no notification will pop up when the app isnt open aswell.
i was trying to add plusClient in the BaseGameActivity but still no change, is something need to be done to make the app listen to invites that im missing?
do i need to publish it to see invite notifications?
sending invites to someone that doesnt have the app should send him to google play?
Invitations are delivered via push notification (like GCM), so several factors may influence in the system's ability to deliver them. If you don't get invites through the notification bar, there is something wrong with the network or with the device. Push messages are somehow not getting through to it. Can you send a gtalk ping to the device, and does it appear on the notification bar?
Once you do get to a state where notifications via notification bar are showing, but are not able to receive them in your app, I'd check:
(1) Are you registering an anonymous listener as an invitation listener? That's problematic. Take a look at this tip.
(2) Are you waiting a sufficient amount of time? Sometimes it may take > 30sec before a notification arrives, depending on network connectivity. With good network it should be faster, though.