Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B45D8200D27 for ; Wed, 25 Oct 2017 14:16:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B2CDD1609E5; Wed, 25 Oct 2017 12:16:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B96DB160BF2 for ; Wed, 25 Oct 2017 14:16:08 +0200 (CEST) Received: (qmail 23208 invoked by uid 500); 25 Oct 2017 12:16:07 -0000 Mailing-List: contact issues-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list issues@activemq.apache.org Received: (qmail 23135 invoked by uid 99); 25 Oct 2017 12:16:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Oct 2017 12:16:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 069AC1A133E for ; Wed, 25 Oct 2017 12:16:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -98.688 X-Spam-Level: X-Spam-Status: No, score=-98.688 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URI_HEX=1.313, URI_TRY_3LD=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id lGOk5kdl0co4 for ; Wed, 25 Oct 2017 12:16:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 0F51F5FE0E for ; Wed, 25 Oct 2017 12:16:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7E6A7E2573 for ; Wed, 25 Oct 2017 12:16:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id C67EC212FF for ; Wed, 25 Oct 2017 12:16:00 +0000 (UTC) Date: Wed, 25 Oct 2017 12:16:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ARTEMIS-1478) ActiveMQ Artemis to Kafka Bridge MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 25 Oct 2017 12:16:09 -0000 [ https://issues.apache.org/jira/browse/ARTEMIS-1478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16218483#comment-16218483 ] ASF GitHub Bot commented on ARTEMIS-1478: ----------------------------------------- Github user gemmellr commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1607#discussion_r146821726 --- Diff: docs/user-manual/en/kafka-bridges.md --- @@ -0,0 +1,180 @@ +# Apache ActiveMQ Kafka Bridge + +The function of a bridge is to consume messages from a source queue in Apache ActiveMQ Artemis, +and forward them to a target topic, on a remote Apache Kafka server. + +By pairing Apache ActiveMQ Artemis and Apache Kafka with the bridge you could have a hybrid broker setup, +having a data flow with CORE, AMQP, MQTT clients, as well as now Kafka clients also. +Taking and giving the best features of both broker technologies when and where needed for a flow of data. + +![ActiveMQ Artemis Kafka Bridge Clients](images/activemq-kafka-bridge-clients.png) + +The intent is this will be a two way bridge, but currently the flow is a single direction +from Apache ActiveMQ Artemis to Apache Kafka + + +The source and target servers are remote making bridging suitable +for reliably sending messages from one artemis cluster to kafka, +for instance across a WAN, to the cloud, or internet and where the connection may be unreliable. + +The bridge has built in resilience to failure so if the target server +connection is lost, e.g. due to network failure, the bridge will retry +connecting to the target until it comes back online. When it comes back +online it will resume operation as normal. + +![ActiveMQ Artemis Kafka Bridge Diagram](images/activemq-kafka-bridge-diagram.png) + +In summary, Apache ActiveMQ Kafka Bridge is a way to reliably connect separate +Apache ActiveMQ Artemis server and Apache Kafka server together. + +## Configuring Kakfa Bridges + +Bridges are configured in `broker.xml`. +Let's kick off +with an example (this is actually from the kafka bridge test example): + + + + + org.apache.activemq.artemis.integration.kafka.bridge.KafkaProducerBridgeFactory + + + + + + +In the above example we have shown the required parameters to +configure for a kakfa bridge. See below for a complete list of available configuration options. + +### Serialization +By default the CoreMessageSerializer is used. + +#### CoreMessageSerializer +Default but can be explicitly set using + + + +This maps the Message properties to Record headers. +And then maps the payload binary as the Record value, encoding TextMessage + +This makes it easy to consume from Kafka using default deserializers +TextMessage using StringDeserializer and +ByteMessage using BytesDeserializer. + +Also to note, if you serialized your objects using binary serialization like Apache Avro, Apache Thrift etc. into a byte array for the ByteMessage, +as that byte array is preserved in the record value part as is, you could deserialize using an equivalent deserializer +direct to back into Avro Record / Thrift Struct. + +Also supplied are some Apache Kafka deserializers allowing you to consume from Apache Kafka +and get a more familiar CoreMessage or JMSMessage, that your consumers can use: + +`org.apache.activemq.artemis.integration.kafka.protocol.core.jms.CoreJmsMessageDeserializer` +`org.apache.activemq.artemis.integration.kafka.protocol.core.CoreMessageDeserializer` + +You can get these Apache Kafka, Serializers/Deserializers via maven using the following GAV coordinates: + + + org.apache.activemq + artemis-kafka-core-protocol + 2.4.0-SNAPSHOT --- End diff -- I'd guess version is just going to go stale, and be wrong for any given release docs since its SNAPSHOT. Might be best to use a placeholder value. > ActiveMQ Artemis to Kafka Bridge > -------------------------------- > > Key: ARTEMIS-1478 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1478 > Project: ActiveMQ Artemis > Issue Type: Bug > Reporter: Michael Andre Pearce > Assignee: Michael Andre Pearce > > To create a service connector to bridge messages in similar fashion as a core bridge to kafka. > The first scope of this is to provide an Artemis to Kafka bridge, but the end goal (another jira later) to provide the return leg. > This essentially would mean for a data flow clients can connect and produce to a data flow on all the supported protocols (amqp, core, mqtt etc) and like wise consume, but also on the same data flow you can have kafka consumers. > http://activemq.2283324.n4.nabble.com/Kafka-ServiceConnector-td4731430.html#a4731436 -- This message was sent by Atlassian JIRA (v6.4.14#64029)