[
https://issues.apache.org/jira/browse/BEAM-13608?focusedWorklogId=755135&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-755135
]
ASF GitHub Bot logged work on BEAM-13608:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 11/Apr/22 08:43
Start Date: 11/Apr/22 08:43
Worklog Time Spent: 10m
Work Description: rvballada commented on code in PR #17163:
URL: https://github.com/apache/beam/pull/17163#discussion_r847084544
##########
sdks/java/io/jms/src/main/java/org/apache/beam/sdk/io/jms/JmsIO.java:
##########
@@ -616,21 +628,34 @@ public void close() throws IOException {
abstract @Nullable String getPassword();
- abstract Builder builder();
+ abstract @Nullable SerializableMessageMapper<EventT> getValueMapper();
+
+ abstract @Nullable SerializableFunction<EventT, String>
getTopicNameMapper();
+
+ abstract @Nullable Coder<EventT> getCoder();
+
+ abstract Builder<EventT> builder();
@AutoValue.Builder
- abstract static class Builder {
- abstract Builder setConnectionFactory(ConnectionFactory
connectionFactory);
+ abstract static class Builder<EventT> {
+ abstract Builder<EventT> setConnectionFactory(ConnectionFactory
connectionFactory);
+
+ abstract Builder<EventT> setQueue(String queue);
+
+ abstract Builder<EventT> setTopic(String topic);
+
+ abstract Builder<EventT> setUsername(String username);
- abstract Builder setQueue(String queue);
+ abstract Builder<EventT> setPassword(String password);
- abstract Builder setTopic(String topic);
+ abstract Builder<EventT>
setValueMapper(SerializableMessageMapper<EventT> valueMapper);
Review Comment:
Thinking about the projects already using the legacy "setTopic" method, I
think it would be a big breaking change. And introduces a big complexity as a
lot of usage would not require dynamic topic use, but just setting the topic
name
Issue Time Tracking
-------------------
Worklog Id: (was: 755135)
Time Spent: 1h (was: 50m)
> Dynamic Topics management
> -------------------------
>
> Key: BEAM-13608
> URL: https://issues.apache.org/jira/browse/BEAM-13608
> Project: Beam
> Issue Type: Improvement
> Components: io-java-jms
> Reporter: Vincent BALLADA
> Assignee: Vincent BALLADA
> Priority: P2
> Labels: assigned:
> Time Spent: 1h
> Remaining Estimate: 0h
>
> JmsIO write function is able to publish messages to topics with static names:
> company/employee/id/1234567.
> Some AMQP/JMS broker provides the ability to publish to dynamic topics like:
> company/employee/id/\{employeeId}
> If we want to handle that with Apache Beam JmsIO, we must create a branch per
> employeeId, which is not suitable for a company with thousand of employee, or
> other similat use cases.
> The JmsIO write function should provide the ability to handle dynamic topics.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)