Internal and External communication in Kafka
Flow:
On-Prem ------>Proxy--->Kafka
advertised.listeners=PLAINTEXT://proxyhostname:8080 - for external communication
listeners=PLAINTEXT://:9092 = for internal communication
•When we set both the property, the internal communication is not happening.(Replication issue and the consumer couldn’t connect via locally and we have to provide the proxy Ip for consumer communication)
•How we can effectively use both the property for internal and external communication?
•Any alternative idea to do the external and internal communication?
apache-kafka
New contributor
add a comment |
Flow:
On-Prem ------>Proxy--->Kafka
advertised.listeners=PLAINTEXT://proxyhostname:8080 - for external communication
listeners=PLAINTEXT://:9092 = for internal communication
•When we set both the property, the internal communication is not happening.(Replication issue and the consumer couldn’t connect via locally and we have to provide the proxy Ip for consumer communication)
•How we can effectively use both the property for internal and external communication?
•Any alternative idea to do the external and internal communication?
apache-kafka
New contributor
add a comment |
Flow:
On-Prem ------>Proxy--->Kafka
advertised.listeners=PLAINTEXT://proxyhostname:8080 - for external communication
listeners=PLAINTEXT://:9092 = for internal communication
•When we set both the property, the internal communication is not happening.(Replication issue and the consumer couldn’t connect via locally and we have to provide the proxy Ip for consumer communication)
•How we can effectively use both the property for internal and external communication?
•Any alternative idea to do the external and internal communication?
apache-kafka
New contributor
Flow:
On-Prem ------>Proxy--->Kafka
advertised.listeners=PLAINTEXT://proxyhostname:8080 - for external communication
listeners=PLAINTEXT://:9092 = for internal communication
•When we set both the property, the internal communication is not happening.(Replication issue and the consumer couldn’t connect via locally and we have to provide the proxy Ip for consumer communication)
•How we can effectively use both the property for internal and external communication?
•Any alternative idea to do the external and internal communication?
apache-kafka
apache-kafka
New contributor
New contributor
edited 2 days ago
Nishu Tayal
11.5k73481
11.5k73481
New contributor
asked 2 days ago
satheesh S
12
12
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
It's very common to define multiple listeners and Kafka supports that very well.
To define several listeners, you need to list all of them in advertised.listeners
/listeners
.
If multiple listeners are going to use the same Security Protocol (PLAINTEXT
), you also need to set listener.security.protocol.map
to map custom names to Security Protocols. See broker configs in the Kafka Docs.
For example:
listener.security.protocol.map=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
advertised.listeners=INTERNAL://:9092,EXTERNAL://proxyhostname:8080
listeners=INTERNAL://:9092,EXTERNAL://:8080
This maps 2 names EXTERNAL
and INTERNAL
(you can use any name you like, I just reused names from your question) to the PLAINTEXT
security protocol. Then for each, it defines the port to listen to and the hostname to advertise in metadata responses.
We are using Cloudera here.
– satheesh S
yesterday
Thanks for the answer. We are using cloudera here. When we add the below property,Kafka server is showing the error. listener.security.protocol.map=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT advertised.listeners=INTERNAL://:9092,EXTERNAL://10.91.192.124:8080 2018-12-28 06:03:28,009 FATAL kafka.Kafka$: java.lang.IllegalArgumentException: Error creating broker listeners from 'INTERNAL://:9092,EXTERNAL://10.91.192.124:8080': No enum constant org.apache.kafka.common.protocol.SecurityProtocol.INTERNAL Please assist.
– satheesh S
yesterday
What is the broker version? It looks like your version does not support this feature. This was added in Kafka 0.10.2 (released ~2 years ago), see cwiki.apache.org/confluence/display/KAFKA/….
– Mickael Maison
yesterday
Thanks for the information.we are using 0.10.0+kafka2.1.2. Wiki link suggest that 0.10.2.0 and 0.11.0.0. Please suggest which one we can go ahead.
– satheesh S
yesterday
You need at least 0.10.2 to use this feature. Pre 0.10.2, the only option you have is to use different security protocols for the 2 listeners (or upgrade to a recent version as 0.10.0 is now very old!)
– Mickael Maison
yesterday
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
satheesh S is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53945143%2finternal-and-external-communication-in-kafka%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It's very common to define multiple listeners and Kafka supports that very well.
To define several listeners, you need to list all of them in advertised.listeners
/listeners
.
If multiple listeners are going to use the same Security Protocol (PLAINTEXT
), you also need to set listener.security.protocol.map
to map custom names to Security Protocols. See broker configs in the Kafka Docs.
For example:
listener.security.protocol.map=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
advertised.listeners=INTERNAL://:9092,EXTERNAL://proxyhostname:8080
listeners=INTERNAL://:9092,EXTERNAL://:8080
This maps 2 names EXTERNAL
and INTERNAL
(you can use any name you like, I just reused names from your question) to the PLAINTEXT
security protocol. Then for each, it defines the port to listen to and the hostname to advertise in metadata responses.
We are using Cloudera here.
– satheesh S
yesterday
Thanks for the answer. We are using cloudera here. When we add the below property,Kafka server is showing the error. listener.security.protocol.map=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT advertised.listeners=INTERNAL://:9092,EXTERNAL://10.91.192.124:8080 2018-12-28 06:03:28,009 FATAL kafka.Kafka$: java.lang.IllegalArgumentException: Error creating broker listeners from 'INTERNAL://:9092,EXTERNAL://10.91.192.124:8080': No enum constant org.apache.kafka.common.protocol.SecurityProtocol.INTERNAL Please assist.
– satheesh S
yesterday
What is the broker version? It looks like your version does not support this feature. This was added in Kafka 0.10.2 (released ~2 years ago), see cwiki.apache.org/confluence/display/KAFKA/….
– Mickael Maison
yesterday
Thanks for the information.we are using 0.10.0+kafka2.1.2. Wiki link suggest that 0.10.2.0 and 0.11.0.0. Please suggest which one we can go ahead.
– satheesh S
yesterday
You need at least 0.10.2 to use this feature. Pre 0.10.2, the only option you have is to use different security protocols for the 2 listeners (or upgrade to a recent version as 0.10.0 is now very old!)
– Mickael Maison
yesterday
add a comment |
It's very common to define multiple listeners and Kafka supports that very well.
To define several listeners, you need to list all of them in advertised.listeners
/listeners
.
If multiple listeners are going to use the same Security Protocol (PLAINTEXT
), you also need to set listener.security.protocol.map
to map custom names to Security Protocols. See broker configs in the Kafka Docs.
For example:
listener.security.protocol.map=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
advertised.listeners=INTERNAL://:9092,EXTERNAL://proxyhostname:8080
listeners=INTERNAL://:9092,EXTERNAL://:8080
This maps 2 names EXTERNAL
and INTERNAL
(you can use any name you like, I just reused names from your question) to the PLAINTEXT
security protocol. Then for each, it defines the port to listen to and the hostname to advertise in metadata responses.
We are using Cloudera here.
– satheesh S
yesterday
Thanks for the answer. We are using cloudera here. When we add the below property,Kafka server is showing the error. listener.security.protocol.map=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT advertised.listeners=INTERNAL://:9092,EXTERNAL://10.91.192.124:8080 2018-12-28 06:03:28,009 FATAL kafka.Kafka$: java.lang.IllegalArgumentException: Error creating broker listeners from 'INTERNAL://:9092,EXTERNAL://10.91.192.124:8080': No enum constant org.apache.kafka.common.protocol.SecurityProtocol.INTERNAL Please assist.
– satheesh S
yesterday
What is the broker version? It looks like your version does not support this feature. This was added in Kafka 0.10.2 (released ~2 years ago), see cwiki.apache.org/confluence/display/KAFKA/….
– Mickael Maison
yesterday
Thanks for the information.we are using 0.10.0+kafka2.1.2. Wiki link suggest that 0.10.2.0 and 0.11.0.0. Please suggest which one we can go ahead.
– satheesh S
yesterday
You need at least 0.10.2 to use this feature. Pre 0.10.2, the only option you have is to use different security protocols for the 2 listeners (or upgrade to a recent version as 0.10.0 is now very old!)
– Mickael Maison
yesterday
add a comment |
It's very common to define multiple listeners and Kafka supports that very well.
To define several listeners, you need to list all of them in advertised.listeners
/listeners
.
If multiple listeners are going to use the same Security Protocol (PLAINTEXT
), you also need to set listener.security.protocol.map
to map custom names to Security Protocols. See broker configs in the Kafka Docs.
For example:
listener.security.protocol.map=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
advertised.listeners=INTERNAL://:9092,EXTERNAL://proxyhostname:8080
listeners=INTERNAL://:9092,EXTERNAL://:8080
This maps 2 names EXTERNAL
and INTERNAL
(you can use any name you like, I just reused names from your question) to the PLAINTEXT
security protocol. Then for each, it defines the port to listen to and the hostname to advertise in metadata responses.
It's very common to define multiple listeners and Kafka supports that very well.
To define several listeners, you need to list all of them in advertised.listeners
/listeners
.
If multiple listeners are going to use the same Security Protocol (PLAINTEXT
), you also need to set listener.security.protocol.map
to map custom names to Security Protocols. See broker configs in the Kafka Docs.
For example:
listener.security.protocol.map=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
advertised.listeners=INTERNAL://:9092,EXTERNAL://proxyhostname:8080
listeners=INTERNAL://:9092,EXTERNAL://:8080
This maps 2 names EXTERNAL
and INTERNAL
(you can use any name you like, I just reused names from your question) to the PLAINTEXT
security protocol. Then for each, it defines the port to listen to and the hostname to advertise in metadata responses.
answered 2 days ago
Mickael Maison
7,00932529
7,00932529
We are using Cloudera here.
– satheesh S
yesterday
Thanks for the answer. We are using cloudera here. When we add the below property,Kafka server is showing the error. listener.security.protocol.map=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT advertised.listeners=INTERNAL://:9092,EXTERNAL://10.91.192.124:8080 2018-12-28 06:03:28,009 FATAL kafka.Kafka$: java.lang.IllegalArgumentException: Error creating broker listeners from 'INTERNAL://:9092,EXTERNAL://10.91.192.124:8080': No enum constant org.apache.kafka.common.protocol.SecurityProtocol.INTERNAL Please assist.
– satheesh S
yesterday
What is the broker version? It looks like your version does not support this feature. This was added in Kafka 0.10.2 (released ~2 years ago), see cwiki.apache.org/confluence/display/KAFKA/….
– Mickael Maison
yesterday
Thanks for the information.we are using 0.10.0+kafka2.1.2. Wiki link suggest that 0.10.2.0 and 0.11.0.0. Please suggest which one we can go ahead.
– satheesh S
yesterday
You need at least 0.10.2 to use this feature. Pre 0.10.2, the only option you have is to use different security protocols for the 2 listeners (or upgrade to a recent version as 0.10.0 is now very old!)
– Mickael Maison
yesterday
add a comment |
We are using Cloudera here.
– satheesh S
yesterday
Thanks for the answer. We are using cloudera here. When we add the below property,Kafka server is showing the error. listener.security.protocol.map=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT advertised.listeners=INTERNAL://:9092,EXTERNAL://10.91.192.124:8080 2018-12-28 06:03:28,009 FATAL kafka.Kafka$: java.lang.IllegalArgumentException: Error creating broker listeners from 'INTERNAL://:9092,EXTERNAL://10.91.192.124:8080': No enum constant org.apache.kafka.common.protocol.SecurityProtocol.INTERNAL Please assist.
– satheesh S
yesterday
What is the broker version? It looks like your version does not support this feature. This was added in Kafka 0.10.2 (released ~2 years ago), see cwiki.apache.org/confluence/display/KAFKA/….
– Mickael Maison
yesterday
Thanks for the information.we are using 0.10.0+kafka2.1.2. Wiki link suggest that 0.10.2.0 and 0.11.0.0. Please suggest which one we can go ahead.
– satheesh S
yesterday
You need at least 0.10.2 to use this feature. Pre 0.10.2, the only option you have is to use different security protocols for the 2 listeners (or upgrade to a recent version as 0.10.0 is now very old!)
– Mickael Maison
yesterday
We are using Cloudera here.
– satheesh S
yesterday
We are using Cloudera here.
– satheesh S
yesterday
Thanks for the answer. We are using cloudera here. When we add the below property,Kafka server is showing the error. listener.security.protocol.map=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT advertised.listeners=INTERNAL://:9092,EXTERNAL://10.91.192.124:8080 2018-12-28 06:03:28,009 FATAL kafka.Kafka$: java.lang.IllegalArgumentException: Error creating broker listeners from 'INTERNAL://:9092,EXTERNAL://10.91.192.124:8080': No enum constant org.apache.kafka.common.protocol.SecurityProtocol.INTERNAL Please assist.
– satheesh S
yesterday
Thanks for the answer. We are using cloudera here. When we add the below property,Kafka server is showing the error. listener.security.protocol.map=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT advertised.listeners=INTERNAL://:9092,EXTERNAL://10.91.192.124:8080 2018-12-28 06:03:28,009 FATAL kafka.Kafka$: java.lang.IllegalArgumentException: Error creating broker listeners from 'INTERNAL://:9092,EXTERNAL://10.91.192.124:8080': No enum constant org.apache.kafka.common.protocol.SecurityProtocol.INTERNAL Please assist.
– satheesh S
yesterday
What is the broker version? It looks like your version does not support this feature. This was added in Kafka 0.10.2 (released ~2 years ago), see cwiki.apache.org/confluence/display/KAFKA/….
– Mickael Maison
yesterday
What is the broker version? It looks like your version does not support this feature. This was added in Kafka 0.10.2 (released ~2 years ago), see cwiki.apache.org/confluence/display/KAFKA/….
– Mickael Maison
yesterday
Thanks for the information.we are using 0.10.0+kafka2.1.2. Wiki link suggest that 0.10.2.0 and 0.11.0.0. Please suggest which one we can go ahead.
– satheesh S
yesterday
Thanks for the information.we are using 0.10.0+kafka2.1.2. Wiki link suggest that 0.10.2.0 and 0.11.0.0. Please suggest which one we can go ahead.
– satheesh S
yesterday
You need at least 0.10.2 to use this feature. Pre 0.10.2, the only option you have is to use different security protocols for the 2 listeners (or upgrade to a recent version as 0.10.0 is now very old!)
– Mickael Maison
yesterday
You need at least 0.10.2 to use this feature. Pre 0.10.2, the only option you have is to use different security protocols for the 2 listeners (or upgrade to a recent version as 0.10.0 is now very old!)
– Mickael Maison
yesterday
add a comment |
satheesh S is a new contributor. Be nice, and check out our Code of Conduct.
satheesh S is a new contributor. Be nice, and check out our Code of Conduct.
satheesh S is a new contributor. Be nice, and check out our Code of Conduct.
satheesh S is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53945143%2finternal-and-external-communication-in-kafka%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown