Skip to content

RabbitMQ transport doesn't allow custom message headers.Β #202

@vsabirov

Description

@vsabirov

Hello, this is a very great library! However, there is one small issue regarding the RabbitMQ transport.

Take rabbitmq-delayed-message-exchange plugin for the RabbitMQ server as an example.

Given an up and running RabbitMQ server with the rabbitmq-delayed-message-exchange plugin installed, the task is to simply use it and send a delayed message. For example, notify an external web server with a request after 1 hour, and if it succeeds, send an event down the bus, or else send another notification command down the bus that would be delayed for another 1 hour in case the external server is down or whatever.

This is currently impossible with node-ts/bus, because:

  1. publishMessage builds its own headers from MessageAttributes and doesn't allow user-specified custom headers, so we can't use the x-delay header required for the delayed message.

  2. There is no possible way to create an exchange with a custom type, in our case x-delayed-type is needed. This is because all methods and fields to achieve this are privated out, so there is no intended way.

It would be much more helpful to be able to specify custom message headers and assert custom exchanges.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions