servicestack.redis

ServiceStack Messaging API: Can it make a broadcast?

南楼画角 提交于 2021-02-10 15:45:46
问题 As I have previously mentioned, I am using ServiceStack Messaging API ( IMessageQueueClient.Publish ) as well as the more low-level IRedisClient.PublishMessage . I use the Messaging API when I need a specific message/request to be processed by only one instance of a module/service, so even though I might have several modules running that all listens for MyRequest , only one service receives the message and processes it. I use the IRedisClient.PublishMessage when I do a broadcast, a pub/sub

ServiceStack Messaging API: Can it make a broadcast?

我的梦境 提交于 2021-02-10 15:44:23
问题 As I have previously mentioned, I am using ServiceStack Messaging API ( IMessageQueueClient.Publish ) as well as the more low-level IRedisClient.PublishMessage . I use the Messaging API when I need a specific message/request to be processed by only one instance of a module/service, so even though I might have several modules running that all listens for MyRequest , only one service receives the message and processes it. I use the IRedisClient.PublishMessage when I do a broadcast, a pub/sub

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,

Failed to start redis.service: Unit redis-server.service is masked

a 夏天 提交于 2020-12-27 08:33:41
问题 I Installed Redis Server on ubuntu 16.04. but when I try to start the redis service as $ sudo systemctl start redis I receive message: Failed to start redis.service: Unit redis-server.service is masked. I don't have any idea about this error. 回答1: I found the solution. I think it will help for others | systemctl unmask servicename $ sudo systemctl unmask redis-server.service 回答2: if redis.service file is missed in directory path /etc/systemd/system/redis.service so we have to create file into

Failed to start redis.service: Unit redis-server.service is masked

我的未来我决定 提交于 2020-12-27 08:32:25
问题 I Installed Redis Server on ubuntu 16.04. but when I try to start the redis service as $ sudo systemctl start redis I receive message: Failed to start redis.service: Unit redis-server.service is masked. I don't have any idea about this error. 回答1: I found the solution. I think it will help for others | systemctl unmask servicename $ sudo systemctl unmask redis-server.service 回答2: if redis.service file is missed in directory path /etc/systemd/system/redis.service so we have to create file into

ServiceStack.Redis: PooledRedisClientManager and RedisManagerPool waits for prev req to finish

北慕城南 提交于 2020-05-17 07:10:07
问题 I am testing out the Redis "full duplex" communication as shown here, and reading the docs, I thought that the PooledRedisClientManager as well as RedisManagerPool have a pool of clients, and thus being able to process several MQ messages in parallel. However, in the test project, found here on Github, it seems to me that this is not the case, or I am missing something. The solution consists of: EventPublisher: .NET Core WinForms application for publishing Hello DTOs to the MQ EventConsumer:

Efficient way of mapping data from Redis

早过忘川 提交于 2019-12-24 17:26:09
问题 I'm playing around with Redis and with ServiceStack.Redis as a client. I initially used 'AutoMapper' to map the cached objects into domain objects, but this was pretty slow. Using someone else's example, I set up a custom mapper but this, too, is really slow. Is there something glaringly wrong with the below code? It's taking 4-5 seconds to map 1000 items from Redis. It's the 'GetByIds' client method that's introducing the lag, but I want an efficient way to store collections as lists of IDs

ServiceStack.Redis Unable to read transport - BasicRedisClientManager

跟風遠走 提交于 2019-12-24 06:27:09
问题 I am getting the following error intermittently when trying to read a redis list via ServiceStack.Redis: "Unable to read data from the transport connection: An established connection was aborted by the software in your host machine". I am wondering if my entire concept of how to reliably connect and pool connections to Redis using ServiceStack is wrong. This is my code for connecting using a sealed class and singleton pattern: public sealed class RedisClientBase { public

ServiceStack.Redis Unable to read transport - BasicRedisClientManager

血红的双手。 提交于 2019-12-24 06:27:05
问题 I am getting the following error intermittently when trying to read a redis list via ServiceStack.Redis: "Unable to read data from the transport connection: An established connection was aborted by the software in your host machine". I am wondering if my entire concept of how to reliably connect and pool connections to Redis using ServiceStack is wrong. This is my code for connecting using a sealed class and singleton pattern: public sealed class RedisClientBase { public