Skip to content

Support for Batch sending #107

@TsengSR

Description

@TsengSR

I've been wondering whether or not the messages are sent as batch, when using a transaction and ended up here

model.BasicPublish(
exchange: exchange,
routingKey: routingKey.RoutingKey,
mandatory: mandatory,
basicProperties: props,
body: message.Body
);

From what I understand is, that even though the acknowledges are batched (model.ConfirmSelect()), the messages itself aren't batched, right?

In my research I at least found out that some transport may support that and RabbitMQ is one of them according to this PR rabbitmq/rabbitmq-dotnet-client#368

I wonder if we could have that in RabbitMQ Transport too, preferably as opt-in feature. It's not purely for performance, its more that'd I'd prefer to have either all or none messages being accepted by RabbitMQ rather than having half of them submitted/confirmed and the other half failing when the connection drops or similar.

It doesn't necessary need a public API for batching, just adding it to the transport and using it if the feature been enabled when confirming the message scope

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions