[
https://issues.apache.org/jira/browse/FLINK-8468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16490785#comment-16490785
]
ASF GitHub Bot commented on FLINK-8468:
---------------------------------------
Github user GJL commented on a diff in the pull request:
https://github.com/apache/flink/pull/5410#discussion_r190888669
--- Diff:
flink-connectors/flink-connector-rabbitmq/src/main/java/org/apache/flink/streaming/connectors/rabbitmq/RMQSink.java
---
@@ -40,22 +40,36 @@
private static final Logger LOG =
LoggerFactory.getLogger(RMQSink.class);
- protected final String queueName;
+ protected String queueName;
private final RMQConnectionConfig rmqConnectionConfig;
protected transient Connection connection;
protected transient Channel channel;
protected SerializationSchema<IN> schema;
- private boolean logFailuresOnly = false;
+ protected boolean logFailuresOnly = false;
+
+ protected RMQSinkPublishOptions<IN> messageCompute;
/**
* @param rmqConnectionConfig The RabbitMQ connection configuration
{@link RMQConnectionConfig}.
* @param queueName The queue to publish messages to.
* @param schema A {@link SerializationSchema} for turning the Java
objects received into bytes
*/
public RMQSink(RMQConnectionConfig rmqConnectionConfig, String
queueName, SerializationSchema<IN> schema) {
- this.rmqConnectionConfig = rmqConnectionConfig;
+ this(rmqConnectionConfig, schema, null);
this.queueName = queueName;
+ }
+
+ /**
+ * @param rmqConnectionConfig The RabbitMQ connection configuration
{@link RMQConnectionConfig}.
+ * @param schema A {@link SerializationSchema} for turning the Java
objects received into bytes
+ * @param messageCompute A {@link RMQSinkPublishOptions} for providing
message's routing key and/or properties
+ */
+ public RMQSink(RMQConnectionConfig rmqConnectionConfig,
SerializationSchema<IN> schema,
--- End diff --
I think the constructor should be annotated with `@PublicEvolving`, and
`messageCompute` should come after `rmqConnectionConfig` to be consistent with
the other constructor.
> Make the connector to take advantage of AMQP features (routing key, exchange
> and message properties)
> ----------------------------------------------------------------------------------------------------
>
> Key: FLINK-8468
> URL: https://issues.apache.org/jira/browse/FLINK-8468
> Project: Flink
> Issue Type: Improvement
> Components: RabbitMQ Connector
> Affects Versions: 1.4.0
> Reporter: Ph.Duveau
> Priority: Major
>
> Make the connector to take advantage of AMQP features by adding a constructor
> and an interface to implement
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)