[
https://issues.apache.org/jira/browse/BEAM-3498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16332685#comment-16332685
]
Luke Cwik commented on BEAM-3498:
---------------------------------
I don't believe this is valid, the spec for pubsub seems to be string key and
string value as per:
{code:java}
{
"message": {
"attributes": {
"string-value": "string-value",
// ... more attributes
},
"data": "base64-no-line-feeds-variant-representation-of-payload",
"message_id": "string-value",
"publish_time": "string-value",
},
"subscription": "string-value"
}{code}
> PubsubMessageWithAttributesCoder should allow null attribute values
> -------------------------------------------------------------------
>
> Key: BEAM-3498
> URL: https://issues.apache.org/jira/browse/BEAM-3498
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-gcp
> Reporter: Sameer Abhyankar
> Assignee: Chamikara Jayalath
> Priority: Major
>
> PubsubMessageWithAttributesCoder does not allow for a PubsubMessage with
> "null" attribute value based on the following code snippet in
> PubsubMessageWithAttributesCoder.java:
> ....
> private static final Coder<Map<String, String>> ATTRIBUTES_CODER =
> NullableCoder.of(MapCoder.of(StringUtf8Coder.of(), StringUtf8Coder.of()));
> ...
>
> If I am not mistaken, this should be:
> ....
> private static final Coder<Map<String, String>> ATTRIBUTES_CODER =
> NullableCoder.of(MapCoder.of(StringUtf8Coder.of(),
> NullableCoder.of(StringUtf8Coder.of())));
> ...
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)