Skip to content

spring-rabbitmq-sink: Missing options for publisher confirms #2790

@oscerd

Description

@oscerd

Description

The spring-rabbitmq-sink Kamelet currently has no configuration options to enable publisher confirms mode (wait for ack/nack). Enabling this requires configuring Spring's CachingConnectionFactory (property publisherConfirmType) and the corresponding sink parameters.

Originally reported against the RabbitMQ sink connector in camel-kafka-connector: apache/camel-kafka-connector#1737. The same gap exists in the spring-rabbitmq-sink Kamelet shipped by this repository (kamelets/spring-rabbitmq-sink.kamelet.yaml).

Expected Behavior

The Kamelet should expose properties to control publisher confirms, for example:

definition:
  properties:
    confirm:
      title: Confirm
      type: string
      enum: [ "auto", "enabled", "disabled" ]
      default: "auto"
      description: Controls whether to wait for confirms. The connection factory must be configured for publisher confirms. auto = Camel detects if the connection factory uses confirms or not. disabled = Confirms is disabled. enabled = Confirms is enabled.
    confirmTimeout:
      title: Confirm timeout
      type: string
      default: "5000"
      description: Specify the timeout in milliseconds to wait for a message sent to be confirmed by RabbitMQ when doing send-only messaging (InOnly). Negative means indefinite.
    confirmType:
      title: Confirm type
      type: string
      enum: [ "SIMPLE", "CORRELATED", "NONE" ]
      default: "NONE"
      description: Publisher confirm type used by the underlying CachingConnectionFactory.
    publisherReturns:
      title: Publisher returns
      type: boolean
      default: false
      description: Whether publisher returns are enabled on the CachingConnectionFactory.

template:
  beans:
    - name: connectionFactory
      type: "#class:org.springframework.amqp.rabbit.connection.CachingConnectionFactory"
      properties:
        ...
        publisherConfirmType: '{{confirmType}}'
        publisherReturns: '{{publisherReturns}}'
  from:
    uri: "kamelet:source"
    steps:
      - to:
          uri: "spring-rabbitmq://{{exchangeName}}"
          parameters:
            ...
            confirm: "{{confirm}}"
            confirmTimeout: "{{confirmTimeout}}"

Additional Context

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions