message queue - ServiceStack: How to make InMemoryTransientMessageService run in a background -


what needs done make inmemorytransientmessageservice run in background thread? publish things inside service using

   base.messageproducer.publish(new requestdto()); 

and exececuted inside service-request.

the project self-hosted.

here quick unit test showing blocking of current request instead of deferring background:

there nothing out of box. have build own. take @ servicestack.redis.messaging.redismqhost - of need there, , simpler (one thread everything) going when compared servicestack.redis.messaging.redismqserver (one thread queue listening, 1 each worker). suggest take class , adapt needs.

a few pointers:

  • servicestack.message.inmemorymessagequeueclient not implement waitfornotifyonany() need alternative way of getting background thread wait incoming messages.
  • closely related, servicestack.redis implementation uses topic subscriptions, in class used transfer workerstatus.stopcommand, means have find alternative way of getting background thread stop.
  • finally, may want adapt servicestack.redis.messaging.redismessageproducer publish() method pushes message requested queue , pushes channel / queue name topicin queue. after reading code can see how 3 points tie together.

hope helps...


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -