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

AMQP: Fixes handling null replyTo header in AmqpReplyToSinkStage #2371

Merged
merged 1 commit into from
Aug 6, 2020
Merged

AMQP: Fixes handling null replyTo header in AmqpReplyToSinkStage #2371

merged 1 commit into from
Aug 6, 2020

Conversation

Grandys
Copy link
Contributor

@Grandys Grandys commented Aug 4, 2020

Fixes situation when properties of the message are present, but replyTo header in this properties is null. In that case elem.properties.map(_.getReplyTo) evaluated to Some(null) and sending message resulted with the error:

java.lang.IllegalStateException: Invalid configuration: 'routingKey' must be non-null.
	at com.rabbitmq.client.impl.AMQImpl$Basic$Publish.<init>(AMQImpl.java:2280)
	at com.rabbitmq.client.AMQP$Basic$Publish$Builder.build(AMQP.java:1219)
	at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:696)
	at com.rabbitmq.client.impl.recovery.AutorecoveringChannel.basicPublish(AutorecoveringChannel.java:202)
	at akka.stream.alpakka.amqp.impl.AmqpReplyToSinkStage$$anon$1$$anon$2.onPush(AmqpReplyToSinkStage.scala:74)

Copy link
Member

@ennru ennru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ennru ennru merged commit f25228f into akka:master Aug 6, 2020
@ennru ennru added this to the 2.0.2 milestone Aug 6, 2020
@ennru
Copy link
Member

ennru commented Aug 6, 2020

Thank you @Grandys!

@Grandys Grandys deleted the amqp-handling-reply-to-not-defined branch August 6, 2020 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants