Relative Content

Tag Archive for .netrabbitmqmasstransit

Access RabbitMQ message headers from MassTransit consumer

Is there a way to get the message headers from RabbitMQ (different than the headers set through MassTransit)?
My use case is, I’m trying to read the timestamp added by RabbitMQ, timestamp_in_ms (previously generated by RabbitMQ plugin, now native via configuration).
I’ve checked the docs and debugged, but couldn’t find any RabbitMQ header key in what I receive.
I’m aware MassTransit adds its own “SentTime” on the message envelope, but I believe this is different than the timestamp as filled in by RabbitMQ itself (with server local time of the broker).

MassTransit exhibits a LIFO (Last-In, First-Out) order for Job Consumers

In my .NET Core application, I’m using MassTransit Job Consumer to run some long-running jobs. However, I noticed that the jobs that are submitted concurrently (within a few seconds) seem to be distributed to the Job Consumer in LIFO order, which is opposed to FIFO in normal message consumers. Is that an expected behavior? If so, how can I make it to use FIFO? FYI – I’m using Sql Server for Saga Repository.