Skip to content

Using DotNetCore.Cap with RabbitMQ federation plugin, some headers with object values cause exceptions #1036

@ustaserdar

Description

@ustaserdar

Hi,

We use CAP in our event based microservices on ASP.NET Core Web APIs as a outbox solution. Also use RabbitMQ for message/queue processes. API should communicate with message/queue systems with other applications but these clusters are located different servers. Because of that should set federational system on RabbitMQ clusters.

As a result, realized that some problem about headers when sharing events. RabbitMQ federation plugin forces events to share with "x-received-from" header and that header value is an object. So "OnConsumerReceived" event in RabbitMQConsumerClient, reading headers end-to-end and then trying to explicit cast header value to byte array (RabbitMQConsumerClient. cs file, line 185). And it causes exception for headers like i mentioned. It should be blocked or ignored, it depends on you. But according to me, developers don't have to add that file as a class library in projects and make a custom solution.

I hope it will fix as soon as possible.
Thanks a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions