Skip to content

Commit

Permalink
fixup! Put all publish frames in a single huge buffer and send it once
Browse files Browse the repository at this point in the history
  • Loading branch information
carlhoerberg committed Sep 19, 2024
1 parent ed11ed7 commit 6dc9be3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/amqp-channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ export class AMQPChannel {
* @param [immediate] - if the message should be returned if it can't be delivered to a consumer immediately (not supported in RabbitMQ)
* @return - fulfilled when the message is enqueue on the socket, or if publish confirm is enabled when the message is confirmed by the server
*/
basicPublish(exchange: string, routingKey: string, data: string|Uint8Array|ArrayBuffer|Buffer|null, properties: AMQPProperties = {}, mandatory = false, immediate = false): Promise<number> {
async basicPublish(exchange: string, routingKey: string, data: string|Uint8Array|ArrayBuffer|Buffer|null, properties: AMQPProperties = {}, mandatory = false, immediate = false): Promise<number> {
if (this.closed) return this.rejectClosed()
if (this.connection.blocked)
return Promise.reject(new AMQPError(`Connection blocked by server: ${this.connection.blocked}`, this.connection))
Expand Down

0 comments on commit 6dc9be3

Please sign in to comment.