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

CloudEventMessageBuilder creates URI with surrounding quotes #1089

Open
kschlesselmann opened this issue Nov 6, 2023 · 0 comments
Open

CloudEventMessageBuilder creates URI with surrounding quotes #1089

kschlesselmann opened this issue Nov 6, 2023 · 0 comments

Comments

@kschlesselmann
Copy link

Currently we're migrating some of our messages to Cloud Events. If we use

CloudEventMessageBuilder.withData(this)
        .setId(UUID.randomUUID().toString())
        .setSource("/my/source")
        .setSpecVersion("1.0")
        .setType("my.type")
        .setHeader(KafkaHeaders.KEY, myId)
        .build(CloudEventMessageUtils.KAFKA_ATTR_PREFIX)

the resulting message apparently has a header ce_source="/my/source" and other clients which validate the incoming messages fail with "/my/source" not being a valid URI.

If I just set the header myself using .setHeader(CloudEventMessageUtils.SOURCE, "/my/source") everything seems fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant