Skip to content

Allow custom exchange types (for delayed-message-exchange plugin) #16

@biiiipy

Description

@biiiipy

By design EasyNetQ throws exception, when trying to set a custom exchange type:
Unknown exchange type 'x-delayed-message', expected one of direct, topic, fanout, headers
The problem is with this first party RabbitMQ plugin that needs a custom exchange type - https://github.com/rabbitmq/rabbitmq-delayed-message-exchange

There should probably be a way to add custom exchange types to the predefined list in ExchangeInfo.cs class.

As a workaround, I'm overriding the Type with reflection:
exchangeInfo.GetType().GetProperty(nameof(exchangeInfo.Type)).SetValue(exchangeInfo, "x-delayed-message");

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions