Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AmqpSender

AMQP Sender interface used to send messages.

Hierarchy

  • AmqpSender

Implements

  • any

Index

Methods

address

  • address(): string
  • Returns string

close

  • close(): PromiseLike<void>
  • close(handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): void
  • Closes the sender.

    Returns PromiseLike<void>

  • Closes the sender.

    Parameters

    • handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>

    Returns void

connection

  • Gets the connection having created the sender. Cannot be null

    Returns AmqpConnection

drainHandler

  • drainHandler(arg0: ((res: void) => void) | Handler<void> | null | undefined): WriteStream<AmqpMessage>
  • Parameters

    • arg0: ((res: void) => void) | Handler<void> | null | undefined

    Returns WriteStream<AmqpMessage>

end

  • end(): PromiseLike<void>
  • end(arg0: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): void
  • end(data: AmqpMessage): PromiseLike<void>
  • end(data: AmqpMessage, handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): void
  • Returns PromiseLike<void>

  • Parameters

    • arg0: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>

    Returns void

  • Parameters

    Returns PromiseLike<void>

  • Parameters

    • data: AmqpMessage
    • handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>

    Returns void

exceptionHandler

  • exceptionHandler(handler: ((res: Throwable) => void) | Handler<Throwable> | null | undefined): AmqpSender
  • Parameters

    • handler: ((res: Throwable) => void) | Handler<Throwable> | null | undefined

    Returns AmqpSender

remainingCredits

  • remainingCredits(): number
  • Returns number

send

  • Sends an AMQP message. The destination the configured sender address or the address configured in the message.

    Parameters

    Returns AmqpSender

sendWithAck

  • sendWithAck(message: AmqpMessage): PromiseLike<void>
  • sendWithAck(message: AmqpMessage, acknowledgementHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): AmqpSender
  • Sends an AMQP message and waits for an acknowledgement. The acknowledgement handler is called with an marked as failed if the message has been rejected or re-routed. If the message has been accepted, the handler is called with a success.

    Parameters

    Returns PromiseLike<void>

  • Sends an AMQP message and waits for an acknowledgement. The acknowledgement handler is called with an marked as failed if the message has been rejected or re-routed. If the message has been accepted, the handler is called with a success.

    Parameters

    • message: AmqpMessage
    • acknowledgementHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>

    Returns AmqpSender

setWriteQueueMaxSize

  • setWriteQueueMaxSize(maxSize: number): AmqpSender
  • Parameters

    • maxSize: number

    Returns AmqpSender

unwrap

  • unwrap(): any
  • Returns any

write

  • write(arg0: AmqpMessage): PromiseLike<void>
  • write(arg0: AmqpMessage, arg1: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): void
  • Parameters

    Returns PromiseLike<void>

  • Parameters

    • arg0: AmqpMessage
    • arg1: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>

    Returns void

writeQueueFull

  • writeQueueFull(): boolean
  • Returns boolean

Generated using TypeDoc