Skip to content

[FLINK-20628] Port RabbitMQ Connector using unified Source #16

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flink-connector-rabbitmq/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# License of the Rabbit MQ Connector
# License of the RabbitMQ Connector

Flink's RabbitMQ connector defines a Maven dependency on the
"RabbitMQ AMQP Java Client", is triple-licensed under the Mozilla Public License 1.1 ("MPL"), the GNU General Public License version 2 ("GPL") and the Apache License version 2 ("ASL").
Expand Down
25 changes: 25 additions & 0 deletions flink-connector-rabbitmq/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,31 @@ under the License.

<dependencies>

<!-- Core -->

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-base</artifactId>
<version>${flink.version}</version>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java</artifactId>
<version>${flink.version}</version>
<scope>provided</scope>
</dependency>

<!-- RabbitMQ -->

<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
<version>${rabbitmq.version}</version>
</dependency>

<!-- Tests -->

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java</artifactId>
Expand All @@ -62,6 +74,13 @@ under the License.
<type>test-jar</type>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-test-utils</artifactId>
<version>${flink.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-runtime</artifactId>
Expand All @@ -88,6 +107,12 @@ under the License.
</exclusions>
</dependency>

<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>rabbitmq</artifactId>
<scope>test</scope>
</dependency>

<!-- ArchUit test dependencies -->

<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.flink.connector.rabbitmq.common;

/**
* The different consistency modes that can be defined for the sink and source individually.
*
* <p>The available consistency modes are as follows.
*
* <ul>
* <li><code>AT_MOST_ONCE</code> Messages are consumed by the output once or never.
* <li><code>AT_LEAST_ONCE</code> Messages are consumed by the output at least once.
* <li><code>EXACTLY_ONCE</code> Messages are consumed by the output exactly once.
* </ul>
*
* <p>Note that the higher the consistency guarantee gets, fewer messages can be processed by the
* system. At-least-once and exactly-once should only be used if necessary.
*/
public enum ConsistencyMode {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we use DeliveryGuarantee to replace the ConsistencyMode ?

AT_MOST_ONCE,
AT_LEAST_ONCE,
EXACTLY_ONCE,
}
Loading