Dhairya-007 opened a new pull request, #30106:
URL: https://github.com/apache/camel/pull/30106
## Problem
The delivery-mode header names its enum by simple name only:
```java
javaType = "MessageDeliveryMode")
public static final String DELIVERY_MODE = "CamelSpringRabbitmqDeliveryMode";
```
`MessageDeliveryMode` is `org.springframework.amqp.core.MessageDeliveryMode`
- a Spring AMQP enum, not something from the RabbitMQ client or from Camel,
which is exactly what a reader needs to know to set it.
Because the short name does not resolve, the header also loses its value
list: the generator derives an `enum` from a resolved enum class, so the
catalog published no accepted values.
```json
"CamelSpringRabbitmqDeliveryMode": { ..., "javaType": "MessageDeliveryMode",
... }
```
After qualifying it, both values are published:
```json
"javaType": "org.springframework.amqp.core.MessageDeliveryMode",
"enum": [ "NON_PERSISTENT", "PERSISTENT" ]
```
which is worth having for this header in particular: persistence is the
choice that decides whether a message survives a broker restart, and
`NON_PERSISTENT` / `PERSISTENT` are not the `1` / `2` that the AMQP spec and
much of the RabbitMQ documentation use for the same thing.
Fully qualified is the convention by a wide margin across the catalog: 3692
header `javaType` values are fully qualified or a built-in type, and 151 are
not.
## Fix
Qualify it to `org.springframework.amqp.core.MessageDeliveryMode`, the FQN
the component's own sources import. The header name is untouched.
Metadata only - no behaviour change. I diffed the regenerated catalog file
against `main`: the only differences are this `javaType` and the `enum` list
appearing beside it.
--
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]