davsclaus opened a new pull request, #3153:
URL: https://github.com/apache/camel-kamelets/pull/3153

   _Claude Code on behalf of Claus Ibsen_
   
   A batch of Kamelets rewritten to the documentation standard proposed in 
#3140, `docs/modules/ROOT/pages/documenting.adoc`, like #3141–#3152.
   
   This batch has 20 messaging Kamelets and their partial pages, all sources 
and sinks:
   - JMS for Apache Artemis (plain and pooled), AMQP 1.0 and IBM MQ;
   - MQTT 3 and MQTT 5;
   - NATS, Pulsar, SMPP and Spring RabbitMQ.
   
   A reader can now tell which one fits, whether it is for a queue or a topic, 
and what happens to a message once it is read.
   
   ## How they were checked
   
   **Every one was run against its broker in Docker:** Artemis (also on its 
AMQP port), IBM MQ, Mosquitto, NATS, Pulsar standalone and RabbitMQ. SMPP was 
run against an SMPP simulator.
   
   ## Facts that were missing or wrong before
   
   - **JMS sinks:**
     - text goes as a TextMessage, bytes as a BytesMessage, a Map as a 
MapMessage;
     - the other headers go as JMS properties.
   - **JMS sources:**
     - a queue message is removed when received, and not redelivered when the 
flow fails;
     - a topic delivers only while connected.
   - **Login:**
     - plain Artemis and AMQP 1.0 can log in only through the address, such as 
`?user=&password=` or `?jms.username=&jms.password=`;
     - pooled Artemis and IBM MQ have options for it.
   - **MQTT:**
     - `mqtt-sink` publishes at QoS 2, not retained;
     - neither MQTT sink sends the headers, not even MQTT 5 user properties;
     - the output is bytes.
   - **NATS:**
     - headers go as NATS headers;
     - the JetStream sink fails when the stream does not exist;
     - the JetStream source reads the whole stream again on every start.
   - **Pulsar:**
     - headers are not sent;
     - the source's subscription is durable, and a failed message is 
redelivered forever.
   - **Spring RabbitMQ:**
     - text goes as `text/plain`, and headers as AMQP headers;
     - a message sent to a missing exchange is silently lost unless confirms 
are enabled;
     - the `autoDeclare` description was a copy of `routingKey`.
   - **Titles:** `pulsar-*` `lazyStartProducer` was titled "Number Of Consumer 
Threads", and the IBM MQ titles were in the wrong case.
   - **Partial pages:** many listed options that do not exist, such as 
`username`/`password`, `clientId`, `durableSubscriptionName`, 
`messageSelector`, `connName`, `qualityOfService`, `retain` and `cleanSession`. 
Four had placeholder text claiming a "JSON format".
   
   ## Found on the way, not changed here
   
   - **Some sinks wait for a reply.** The four JMS sinks, 
`spring-rabbitmq-sink` and `nats-sink` turn a message that expects a reply into 
a request and reply. Behind `webhook-source`, the HTTP call blocks for 20 s 
(RabbitMQ: 30 s; NATS fails at once). `exchangePattern: InOnly` in the 
templates would fix it. The descriptions say what happens.
   - **`nats-source`:** its `marshal: json` leaves the body as it is and only 
forces `Content-Type: application/json`. With JetStream it cannot be given a 
`durableName`.
   - **`mqtt-source` and `mqtt5-source` share the default client ID** 
`mqtt-source`. Two copies on one broker keep disconnecting each other and lose 
messages.
   - **`jms-amqp-10-sink`** opens a new connection for each message.
   - **Types and secrets:**
     - `pulsar-source` `deadLetterTopic` is typed `integer`, though it is a 
topic name;
     - `spring-rabbitmq-sink` `confirmTimeout` is a `string`;
     - `pulsar-*` `authenticationParams` is not marked as a secret.
   - **IBM MQ dependency:** the client jar is not in `spec.dependencies` 
(because of its licence). It works on Camel JBang, which adds it; elsewhere 
users must add it. The partial page says so again.
   - **Commonly needed component options these Kamelets do not expose:**
     - durable topic subscriptions, selectors and transactions for JMS;
     - QoS, retained messages and persistent sessions for MQTT;
     - queue groups, a durable consumer and TLS for NATS;
     - TON/NPI and data coding for SMPP;
     - prefetch, retry and dead-lettering for RabbitMQ.
   
     These are for a follow-up.
   
   ## Notes for review
   
   - No template, type, default or required list was changed. The `dataTypes` 
blocks are `headers` only, with no `default`.
   - `KameletsCatalogTest.testSupportedHeaders`: the catalog now returns the 
headers these Kamelets declare instead of those of their components. The 
changed counts:
     - JMS AMQP 1.0, Artemis and IBM MQ sources 15 → 4
     - `mqtt5-source` 2 → 3
     - `nats-source` 9 → 3
     - `pulsar-sink` 6 → 2
     - `pulsar-source` 11 → 5
   - This PR is based on `main`; if #3140 merges first, I will rebase it and 
regenerate the index.
   
   `./mvnw clean install` from the root passes.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to