-
Notifications
You must be signed in to change notification settings - Fork 714
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
spring boot 2.6.7 camel ActiveMQByteMessage exchange body is empty byte array #1345
Labels
Comments
Are you up for a PR fixing this?
…On Fri, 2 Sept 2022, 23:46 kesavants, ***@***.***> wrote:
Describe the Bug
When a active mq consumer is implemented with below gradle dependencies
byte message message consumer gets empty byte array
byte[] data = exchange.getIn().getBody(byte[].class); //data is 0 len byte
array
spring.sleuth.messaging.enabled:true
implementation
'org.springframework.cloud:spring-cloud-starter-sleuth:2.6.7'
implementation group: 'org.apache.camel.springboot', name:
'camel-jms-starter', version: "3.14.3"
implementation group: 'org.apache.camel.springboot', name:
'camel-activemq-starter', version: "3.14.3"
Issue is tracer calls setObjectProperty which sets the content to null
which is never reset
public void setObjectProperty(String name, Object value) throws JMSException {
checkReadOnlyProperties();
initializeWritingNoCheck();
super.setObjectProperty(name, value);
}
private void restoreOldContent() throws JMSException {
if (this.content != null && this.content.length > 0) {
try {
ByteSequence toRestore = this.content;
if (isCompressed()) {
toRestore = new ByteSequence(decompress(this.content));
compressed = false;
}
this.dataOut.write(toRestore.getData(), toRestore.getOffset(), toRestore.getLength());
// Free up the buffer from the old content, will be re-written when
// the message is sent again and storeContent() is called.
this.content = null;
} catch (IOException ioe) {
throw JMSExceptionSupport.create(ioe);
}
}
Expected Behaviour
Expect the exchange.getIn().getBody(byte[].class) to return the byte array
of the message
—
Reply to this email directly, view it on GitHub
<#1345>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXOYAQIOXCI4RT6X6E7DI3V4JYUBANCNFSM6AAAAAAQDTOGC4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
sorry not at the moment |
this is similar with #1310 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the Bug
When a active mq consumer is implemented with below gradle dependencies byte message message consumer gets empty byte array
byte[] data = exchange.getIn().getBody(byte[].class); //data is 0 len byte array
spring.sleuth.messaging.enabled:true
implementation 'org.springframework.cloud:spring-cloud-starter-sleuth:2.6.7'
implementation group: 'org.apache.camel.springboot', name: 'camel-jms-starter', version: "3.14.3"
implementation group: 'org.apache.camel.springboot', name: 'camel-activemq-starter', version: "3.14.3"
Issue is tracer calls setObjectProperty which sets the content to null which is never reset
Expected Behaviour
Expect the exchange.getIn().getBody(byte[].class) to return the byte array of the message
The text was updated successfully, but these errors were encountered: