redismqserver

Seeking an understanding of ServiceStack.Redis: IRedisClient.PublishMessage vs IMessageQueueClient.Publish

久未见 提交于 2021-01-29 19:43:17
问题 I am having a hard time separating the IRedisClient.PublishMessage and IMessageQueueClient.Publish and realize I must be mixing something up. ServiceStack gives us the option to listen for pub/sub broadcasts like this: static IRedisSubscription _subscription; static IRedisClient redisClientSub; static int received = 0; static void ReadFromQueue() { redisClientSub = redisClientManager.GetClient(); _subscription = redisClientSub.CreateSubscription(); _subscription.OnMessage = (channel, msg) =>

ServiceStack.Mq: Why isn't the IRedisSubscription.OnMessage fired when manually adding data to the channel?

一笑奈何 提交于 2021-01-29 05:43:16
问题 I am using ServiceStack and the IRedisSubscriber. I have gotten it to work, triggering the OnMessage. However, sometimes it does not trigger, and I am trying to figure out why. The basic setup is: RedisClientManager = new PooledRedisClientManager("localhost:6379"); _mqServer = new RedisMqServer(RedisClientManager, retryCount: 2) { RequestFilter = RequestFilter }; _mqServer.Start(); //Starts listening for messages In a separate class, I have: public MqChannelSubscriber(string eventChannelName,

Implementing WebHooks with ServiceStack

强颜欢笑 提交于 2019-12-05 18:09:17
问题 I'm currently working on a REST service allowing to control and monitor some physical devices. The corresponding REST API is largely based on principles and ideas you can find in the following article: "Controlling and Monitoring Devices with REST". The monitored and controlled devices can generate some events to which clients must be able to subscribe. My idea was to implement that part using RESTful WebHooks. So whenever an event arises, my service makes a REST API callback to each

Implementing WebHooks with ServiceStack

旧城冷巷雨未停 提交于 2019-12-04 03:09:29
I'm currently working on a REST service allowing to control and monitor some physical devices. The corresponding REST API is largely based on principles and ideas you can find in the following article: " Controlling and Monitoring Devices with REST ". The monitored and controlled devices can generate some events to which clients must be able to subscribe. My idea was to implement that part using RESTful WebHooks . So whenever an event arises, my service makes a REST API callback to each subscriber in order to notify it. My question, now: What would be a proper way to implement this scenario