ServiceStack Redis Messaging - IMessage?

James

I would like to use Redis to invoke a service operation on my Service Stack service.

I have created a simple DTO as the message request, and am registering the message service as per the demo pages:

        var messageService = m_Container.Resolve<RedisMqServer>();
        messageService.RegisterHandler<SubscribeAddressRequest>(x => ServiceController.ExecuteMessage(x) );
        messageService.Start();

ServiceStack actually receives these messages, but I get the following error (from my Container):

No component for supporting the service ServiceStack.Messaging.IMessage was found.

This is very odd, why is ServiceStack asking for a dependency to be injected as an IMessage? I have not registered any providers for an IMessage so I understand that this would fail, but I do not see any providers. I am registering the following types:

        string[] RedisHosts = new string[] { (string)ConfigurationManager.AppSettings["RedisHost"] };
        container.Register(
            Component.For<IRedisClientsManager>().ImplementedBy<PooledRedisClientManager>().DependsOn(new { poolSize = 1000, poolTimeOutSeconds = 1, readWriteHosts = RedisHosts }),
            Component.For<RedisMqServer>(),
            Component.For<IMessageQueueClient>().UsingFactoryMethod((k, c) =>
            {
                return k.Resolve<RedisMqServer>().CreateMessageQueueClient();
            })
        );
James

I have found the cause of the issue, which is that my IoC Container (Castle Windsor) is injecting the RequestFilter and ResponseFilter on a RedisMqServer with a dynamic Func with the aim of resolving an IMessage from the container (when using TypedFactoryFacility).

This is because of the delegate-factory which is part of the TypedFactoryFacility (I usually use interface-factories).

I got round this by disabling the automatic enabling of the Castle Windsor delegate-factory when using the Typed Factory Facility:

Remove components in Castle Windsor 3

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Encrypting ServiceStack ServerEventsClient messaging

From Dev

how to check if iMessage, group messaging on during runtime?

From Dev

How to throttle ServiceStack Messaging EventHandler

From Dev

Alternative to servicestack.redis

From Dev

Using ServiceStack Redis with Twemproxy

From Dev

ServiceStack Redis Serialization Error

From Dev

Alternative to servicestack.redis

From Dev

ServiceStack.Redis SearchKeys

From Dev

ServiceStack - Redis Sessions Accumulating

From Java

ServiceStack Messaging API: Can it make a broadcast?

From Dev

ServiceStack Redis - caching expensive queries

From Dev

How to log ServiceStack.Messaging.Message to a database with OrmLite?

From Dev

ServiceStack Redis, how to return Lua table as List

From Dev

Using complex types in RedisTypedClient (ServiceStack Redis)

From Dev

Redis client for C# (serviceStack) - where is the documentation?

From Dev

Redis Pub/Sub ServiceStack, cancelling the thread

From Dev

Mutex violations using ServiceStack Redis for distributed locking

From Dev

Keep copy of original request in Servicestack Redis outq

From Dev

Is it possible to add custom headers to a ServiceStack Redis message?

From Dev

ServiceStack.Redis: Unable to Connect: sPort:

From Dev

MVC4 and ServiceStack session in Redis

From Dev

ServiceStack.Redis Unable to read transport - BasicRedisClientManager

From Dev

ASP.NET vnext and ServiceStack.redis

From Dev

ServiceStack Redis client : remove all objects

From Dev

Redis caching with ServiceStack OrmLite and SQL Server persistence

From Dev

ServiceStack.Redis client - A transaction is already in progress

From Dev

MVC4 and ServiceStack session in Redis

From Dev

Method does not have implementation in servicestack redis

From Dev

servicestack Redis Client AcquireLock TTL has no affect

Related Related

  1. 1

    Encrypting ServiceStack ServerEventsClient messaging

  2. 2

    how to check if iMessage, group messaging on during runtime?

  3. 3

    How to throttle ServiceStack Messaging EventHandler

  4. 4

    Alternative to servicestack.redis

  5. 5

    Using ServiceStack Redis with Twemproxy

  6. 6

    ServiceStack Redis Serialization Error

  7. 7

    Alternative to servicestack.redis

  8. 8

    ServiceStack.Redis SearchKeys

  9. 9

    ServiceStack - Redis Sessions Accumulating

  10. 10

    ServiceStack Messaging API: Can it make a broadcast?

  11. 11

    ServiceStack Redis - caching expensive queries

  12. 12

    How to log ServiceStack.Messaging.Message to a database with OrmLite?

  13. 13

    ServiceStack Redis, how to return Lua table as List

  14. 14

    Using complex types in RedisTypedClient (ServiceStack Redis)

  15. 15

    Redis client for C# (serviceStack) - where is the documentation?

  16. 16

    Redis Pub/Sub ServiceStack, cancelling the thread

  17. 17

    Mutex violations using ServiceStack Redis for distributed locking

  18. 18

    Keep copy of original request in Servicestack Redis outq

  19. 19

    Is it possible to add custom headers to a ServiceStack Redis message?

  20. 20

    ServiceStack.Redis: Unable to Connect: sPort:

  21. 21

    MVC4 and ServiceStack session in Redis

  22. 22

    ServiceStack.Redis Unable to read transport - BasicRedisClientManager

  23. 23

    ASP.NET vnext and ServiceStack.redis

  24. 24

    ServiceStack Redis client : remove all objects

  25. 25

    Redis caching with ServiceStack OrmLite and SQL Server persistence

  26. 26

    ServiceStack.Redis client - A transaction is already in progress

  27. 27

    MVC4 and ServiceStack session in Redis

  28. 28

    Method does not have implementation in servicestack redis

  29. 29

    servicestack Redis Client AcquireLock TTL has no affect

HotTag

Archive