0

I have several subscriptions that listens to different Topics for messages, and some of this messages are dependent on each other. So one message for one subscription "needs" to arrive before another messages in another subscriptions.

I could solve this by storing the messages temporary in a database, but I thought that if I get a message on one subscription and it's correlated messages on a another subscription hasn't arrived yet, I would just wait 1 second and put the first messages back on it's subscription so the correlated messages get's some more time to arrive first.

It's easy if it would have been a Queue, but now it's a subscription and that client don't have any "Send" methods on it.

I don't want to put the messages back on the Topics, since other subscription might not want that messages again.

Since subscriptions basically is a Queue it should be possible, so is there some "base object" that could be used to put messages directly to a subscription queue.

Best Regards Magnus Gladh

Magnus Gladh
  • 1,817
  • 4
  • 20
  • 31
  • When you pull a message from service bus (queue or topic), you'll get a timebased lock as well. If you "Complete" the msg within that timeframe, service bus will assume processing of that msg was succeeded. If however you do not complete within the timeframe, the msg will become available to other clients. This is built in functionality. Check the properties like "AutoComplete" in OnMessageOptions class. – Svend Sep 04 '18 at 13:08

1 Answers1

0

While subscription is a queue behind the scenes, you cannot send messages directly to that queue. Instead, you should target a topic.

If you wish to abort the receive operation, you can when receiving in PeekLock mode.

Sean Feldman
  • 23,443
  • 7
  • 55
  • 80