rabbitmq / rabbitmq/rabbitmq-java-client
AMQContentHeader toString uses dashes instead of underscores for property names
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 587
- Avg merge
- 7h 29m
- Merged PRs (30d)
- 41
Description
The com.rabbitmq.client.impl.AMQContentHeader has the following toString implementation
@Override public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("#contentHeader<").append(getClassName()).append(">");
this.appendPropertyDebugStringTo(sb);
return sb.toString();
}
It generates strings like this
#contentHeader<basic>(content-type=application/json, content-encoding=UTF-8, headers={topic=DOWNLOAD_AND_INSTALL, content-type=application/json, type=EVENT, tenant=DEFAULT, __TypeId__=org.eclipse.hawkbit.dmf.json.model.DownloadAndUpdateRequest, thingId=new_device}, delivery-mode=2, priority=0, correlation-id=null, reply-to=null, expiration=null, message-id=null, timestamp=null, type=null, user-id=null, app-id=null, cluster-id=null)
This could make believe that content-type, content-encoding,..... are "valid" AMQP properties, while in fact RabbitMQ states :
Invalid properties will be ignored. Valid properties are:
content_type
content_encoding
priority
correlation_id
reply_to
expiration
message_id
timestamp
type
user_id
app_id
cluster_id
Notice the difference between the dash (-) and the ('_underscore')
To avoid confusion, the java client should print the "official" property names using underscores.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in com.rabbitmq.client.impl.AMQContentHeader and inspect toString together with appendPropertyDebugStringTo. Update the displayed AMQP property names to use underscores rather than dashes, then verify the resulting output matches the official property names listed in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, rabbitmq
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100