mxriverlynn/rabbus

Req/Res with alternate

BLaurent opened this issue · 1 comments

Hi,
Is there a way to declare a request/response with an alternate.

The requester will be :

    Rabbus.Requester.call(this, rabbus, {
        exchange: {
            name: ex,
            alternate: aex,
            autoDelete: true
        },
        routingKey: topic,
        messageType: type
    });

And responder will be

    Rabbus.Responder.call(this, rabbus, {
        exchange: {
            name: ex,
            //alternate: aex, This is needed
            autoDelete: true
        },
        queue: {
            name: queue,
            limit: 1,
            noBatch: true,
            autoDelete: true
        },
        routingKey: topic,
        messageType: type
    });

But If I enable the aex in the responder will have message form both ex and aex.
On the other hand I cannot have the aex disabled as the responder will try to create it. And as exchange build params are != it this will trigger an exception.
How can I solve this ?

Regards
Ben

I find a way of doing this, there is no issues.