Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support IBM amqp #2530

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Uniserv-StephanWehr
Copy link

@Uniserv-StephanWehr Uniserv-StephanWehr commented Apr 19, 2024

Add output and input options to send and get messages using IBM amqp queue.

Output
IBM MQ provides support for both Queues and Topics. Sender options must be declared and the capability should be set to your destination preference. If this step is omitted, MQ defaults the destination to a Topic.

MQ requires the 'Message.properties.to' field to contain the address of the receiver.

Config Example:

output:
  amqp_1:
    urls: [ amqp://localhost:5672/ ]
    target_address: DEMOQUEUE
    max_in_flight: 64
    target_capabilities: [ "queue" ]
    message_properties_to: amqp://localhost:5672/
    sasl:
      mechanism: anonymous
      user: ""
      password: ""
    metadata:
      exclude_prefixes: [ "demo" ]

Input

Define source capabilities in the receiver options to declare the source as a Queue or a Topic. Once again, MQ defaults to a topic if this is omitted.

Config Example:

input:
  amqp_1:
    urls: [ amqp://localhost:5672/ ]
    source_address: DEMOQUEUE
    credit: 64
    source_capabilities: [ "queue" ]
    sasl:
      mechanism: anonymous
      user: ""
      password: ""

@Uniserv-StephanWehr Uniserv-StephanWehr marked this pull request as draft April 19, 2024 14:09
@Uniserv-StephanWehr Uniserv-StephanWehr changed the title CPM-47 Support IBM amqp Support IBM amqp Apr 19, 2024
@Uniserv-StephanWehr Uniserv-StephanWehr marked this pull request as ready for review April 19, 2024 15:10
mihaitodor and others added 8 commits April 19, 2024 17:28
The `amqp_0_9` has this field already: https://www.benthos.dev/docs/components/outputs/amqp_0_9/#persistent

Implementation inspired from here: Azure/go-amqp#11

This omission was reported on Slack: https://gophers.slack.com/archives/CLWCBK7FY/p1713189832118529

Signed-off-by: Mihai Todor <todormihai@gmail.com>
Signed-off-by: Stephan Wehr <stephan.wehr@uniserv.com>
Signed-off-by: Stephan Wehr <stephan.wehr@uniserv.com>
Signed-off-by: Stephan Wehr <stephan.wehr@uniserv.com>
Signed-off-by: Stephan Wehr <stephan.wehr@uniserv.com>
Signed-off-by: Mihai Todor <todormihai@gmail.com>
Signed-off-by: Stephan Wehr <stephan.wehr@uniserv.com>
I'm not sure why this was added here, but it's also imported via
`public/components/all/package.go`, which imports
`github.com/benthosdev/benthos/v4/public/components/wasm`.

Signed-off-by: Mihai Todor <todormihai@gmail.com>
Signed-off-by: Stephan Wehr <stephan.wehr@uniserv.com>
Don't throw an error when scrubbing empty password fields.

Signed-off-by: Mihai Todor <todormihai@gmail.com>
Signed-off-by: Stephan Wehr <stephan.wehr@uniserv.com>
Clarify how the `@` operator can be used to reference the metadata
of the origin message and replace the deprecated `meta()` function
with `metadata()`.

Signed-off-by: Mihai Todor <todormihai@gmail.com>
Signed-off-by: Stephan Wehr <stephan.wehr@uniserv.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants