How to disable all consumers and producers in spring cloud streams application:
Is there a way we can disable all consumer and producer beans from initializing when configuration is absent in spring cloud stream.
We started migrating our app to use spring cloud streams and we want to push the code but configuration will be present some time in the future. Spring cloud stream is initializing all beans listing on localhost when we dont provide any configuration.
spring-cloud-stream
add a comment |
Is there a way we can disable all consumer and producer beans from initializing when configuration is absent in spring cloud stream.
We started migrating our app to use spring cloud streams and we want to push the code but configuration will be present some time in the future. Spring cloud stream is initializing all beans listing on localhost when we dont provide any configuration.
spring-cloud-stream
I am not sure I follow. Can you explain the following: 1. What do you mean by consumer and producer beans? 2. What configuration is missing and how it may come in the future? 3. Give that your app "may not be functioning when deployed", what are you trying to accomplish by deploying a non-functioning app? 4. What do you mean by ". . .initializing all beans listing on localhost"? Are you talking about default connections? 5. Which binder are you using? Rabbit? Kafka?
– Oleg Zhurakousky
Nov 20 '18 at 12:15
Hi Oleg .. sorry for not been clear. 1) I meant to say the bindings. 2) We would like to deploy 2 instances of this app .. 1 should work with out these bindings and one should one work with the bindings using the configuration specified. 4) When we don't specify the any binding configuration in the app yml .. these bindings are starting with default host pointing to localhost. 5) We are using kafka for now. We would like to have a mechanism to disable these bindings when configuration is not present.
– user2225713
Nov 20 '18 at 15:03
Sorry, but I am still confused. If I am reading this correctly you want to deploy the app which is not bound to anything? What value are you trying to get out of it? I guess this is more of an architectural question and framework may or may not support the architecture you envision. So for now, I guess I want to get more clarity on #3
– Oleg Zhurakousky
Nov 20 '18 at 15:39
@Oleg .. the specific micro service have some other functionality which need to be working after the deployment. I want to push my code related to spring cloud streams with out any configuration or disabling it until the other team starts pushing messages to this specific kafka topic. I could keep these changes in a feature branch until its ready .. but I am looking to see if there is a option to disable these binders. Let me know if its still not clear.
– user2225713
Nov 20 '18 at 15:46
add a comment |
Is there a way we can disable all consumer and producer beans from initializing when configuration is absent in spring cloud stream.
We started migrating our app to use spring cloud streams and we want to push the code but configuration will be present some time in the future. Spring cloud stream is initializing all beans listing on localhost when we dont provide any configuration.
spring-cloud-stream
Is there a way we can disable all consumer and producer beans from initializing when configuration is absent in spring cloud stream.
We started migrating our app to use spring cloud streams and we want to push the code but configuration will be present some time in the future. Spring cloud stream is initializing all beans listing on localhost when we dont provide any configuration.
spring-cloud-stream
spring-cloud-stream
asked Nov 19 '18 at 23:00
user2225713user2225713
13518
13518
I am not sure I follow. Can you explain the following: 1. What do you mean by consumer and producer beans? 2. What configuration is missing and how it may come in the future? 3. Give that your app "may not be functioning when deployed", what are you trying to accomplish by deploying a non-functioning app? 4. What do you mean by ". . .initializing all beans listing on localhost"? Are you talking about default connections? 5. Which binder are you using? Rabbit? Kafka?
– Oleg Zhurakousky
Nov 20 '18 at 12:15
Hi Oleg .. sorry for not been clear. 1) I meant to say the bindings. 2) We would like to deploy 2 instances of this app .. 1 should work with out these bindings and one should one work with the bindings using the configuration specified. 4) When we don't specify the any binding configuration in the app yml .. these bindings are starting with default host pointing to localhost. 5) We are using kafka for now. We would like to have a mechanism to disable these bindings when configuration is not present.
– user2225713
Nov 20 '18 at 15:03
Sorry, but I am still confused. If I am reading this correctly you want to deploy the app which is not bound to anything? What value are you trying to get out of it? I guess this is more of an architectural question and framework may or may not support the architecture you envision. So for now, I guess I want to get more clarity on #3
– Oleg Zhurakousky
Nov 20 '18 at 15:39
@Oleg .. the specific micro service have some other functionality which need to be working after the deployment. I want to push my code related to spring cloud streams with out any configuration or disabling it until the other team starts pushing messages to this specific kafka topic. I could keep these changes in a feature branch until its ready .. but I am looking to see if there is a option to disable these binders. Let me know if its still not clear.
– user2225713
Nov 20 '18 at 15:46
add a comment |
I am not sure I follow. Can you explain the following: 1. What do you mean by consumer and producer beans? 2. What configuration is missing and how it may come in the future? 3. Give that your app "may not be functioning when deployed", what are you trying to accomplish by deploying a non-functioning app? 4. What do you mean by ". . .initializing all beans listing on localhost"? Are you talking about default connections? 5. Which binder are you using? Rabbit? Kafka?
– Oleg Zhurakousky
Nov 20 '18 at 12:15
Hi Oleg .. sorry for not been clear. 1) I meant to say the bindings. 2) We would like to deploy 2 instances of this app .. 1 should work with out these bindings and one should one work with the bindings using the configuration specified. 4) When we don't specify the any binding configuration in the app yml .. these bindings are starting with default host pointing to localhost. 5) We are using kafka for now. We would like to have a mechanism to disable these bindings when configuration is not present.
– user2225713
Nov 20 '18 at 15:03
Sorry, but I am still confused. If I am reading this correctly you want to deploy the app which is not bound to anything? What value are you trying to get out of it? I guess this is more of an architectural question and framework may or may not support the architecture you envision. So for now, I guess I want to get more clarity on #3
– Oleg Zhurakousky
Nov 20 '18 at 15:39
@Oleg .. the specific micro service have some other functionality which need to be working after the deployment. I want to push my code related to spring cloud streams with out any configuration or disabling it until the other team starts pushing messages to this specific kafka topic. I could keep these changes in a feature branch until its ready .. but I am looking to see if there is a option to disable these binders. Let me know if its still not clear.
– user2225713
Nov 20 '18 at 15:46
I am not sure I follow. Can you explain the following: 1. What do you mean by consumer and producer beans? 2. What configuration is missing and how it may come in the future? 3. Give that your app "may not be functioning when deployed", what are you trying to accomplish by deploying a non-functioning app? 4. What do you mean by ". . .initializing all beans listing on localhost"? Are you talking about default connections? 5. Which binder are you using? Rabbit? Kafka?
– Oleg Zhurakousky
Nov 20 '18 at 12:15
I am not sure I follow. Can you explain the following: 1. What do you mean by consumer and producer beans? 2. What configuration is missing and how it may come in the future? 3. Give that your app "may not be functioning when deployed", what are you trying to accomplish by deploying a non-functioning app? 4. What do you mean by ". . .initializing all beans listing on localhost"? Are you talking about default connections? 5. Which binder are you using? Rabbit? Kafka?
– Oleg Zhurakousky
Nov 20 '18 at 12:15
Hi Oleg .. sorry for not been clear. 1) I meant to say the bindings. 2) We would like to deploy 2 instances of this app .. 1 should work with out these bindings and one should one work with the bindings using the configuration specified. 4) When we don't specify the any binding configuration in the app yml .. these bindings are starting with default host pointing to localhost. 5) We are using kafka for now. We would like to have a mechanism to disable these bindings when configuration is not present.
– user2225713
Nov 20 '18 at 15:03
Hi Oleg .. sorry for not been clear. 1) I meant to say the bindings. 2) We would like to deploy 2 instances of this app .. 1 should work with out these bindings and one should one work with the bindings using the configuration specified. 4) When we don't specify the any binding configuration in the app yml .. these bindings are starting with default host pointing to localhost. 5) We are using kafka for now. We would like to have a mechanism to disable these bindings when configuration is not present.
– user2225713
Nov 20 '18 at 15:03
Sorry, but I am still confused. If I am reading this correctly you want to deploy the app which is not bound to anything? What value are you trying to get out of it? I guess this is more of an architectural question and framework may or may not support the architecture you envision. So for now, I guess I want to get more clarity on #3
– Oleg Zhurakousky
Nov 20 '18 at 15:39
Sorry, but I am still confused. If I am reading this correctly you want to deploy the app which is not bound to anything? What value are you trying to get out of it? I guess this is more of an architectural question and framework may or may not support the architecture you envision. So for now, I guess I want to get more clarity on #3
– Oleg Zhurakousky
Nov 20 '18 at 15:39
@Oleg .. the specific micro service have some other functionality which need to be working after the deployment. I want to push my code related to spring cloud streams with out any configuration or disabling it until the other team starts pushing messages to this specific kafka topic. I could keep these changes in a feature branch until its ready .. but I am looking to see if there is a option to disable these binders. Let me know if its still not clear.
– user2225713
Nov 20 '18 at 15:46
@Oleg .. the specific micro service have some other functionality which need to be working after the deployment. I want to push my code related to spring cloud streams with out any configuration or disabling it until the other team starts pushing messages to this specific kafka topic. I could keep these changes in a feature branch until its ready .. but I am looking to see if there is a option to disable these binders. Let me know if its still not clear.
– user2225713
Nov 20 '18 at 15:46
add a comment |
1 Answer
1
active
oldest
votes
How about you do not bind any broker service for the configurations?
The application can have the consumer and producer beans but cannot be used.
Note: This might cause the actuator health endpoint to show app as down.
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
});
}
});
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%2f53383869%2fhow-to-disable-all-consumers-and-producers-in-spring-cloud-streams-application%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
How about you do not bind any broker service for the configurations?
The application can have the consumer and producer beans but cannot be used.
Note: This might cause the actuator health endpoint to show app as down.
add a comment |
How about you do not bind any broker service for the configurations?
The application can have the consumer and producer beans but cannot be used.
Note: This might cause the actuator health endpoint to show app as down.
add a comment |
How about you do not bind any broker service for the configurations?
The application can have the consumer and producer beans but cannot be used.
Note: This might cause the actuator health endpoint to show app as down.
How about you do not bind any broker service for the configurations?
The application can have the consumer and producer beans but cannot be used.
Note: This might cause the actuator health endpoint to show app as down.
answered Jan 27 at 6:08
RaRaRaRa
104
104
add a comment |
add a comment |
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.
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%2f53383869%2fhow-to-disable-all-consumers-and-producers-in-spring-cloud-streams-application%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
I am not sure I follow. Can you explain the following: 1. What do you mean by consumer and producer beans? 2. What configuration is missing and how it may come in the future? 3. Give that your app "may not be functioning when deployed", what are you trying to accomplish by deploying a non-functioning app? 4. What do you mean by ". . .initializing all beans listing on localhost"? Are you talking about default connections? 5. Which binder are you using? Rabbit? Kafka?
– Oleg Zhurakousky
Nov 20 '18 at 12:15
Hi Oleg .. sorry for not been clear. 1) I meant to say the bindings. 2) We would like to deploy 2 instances of this app .. 1 should work with out these bindings and one should one work with the bindings using the configuration specified. 4) When we don't specify the any binding configuration in the app yml .. these bindings are starting with default host pointing to localhost. 5) We are using kafka for now. We would like to have a mechanism to disable these bindings when configuration is not present.
– user2225713
Nov 20 '18 at 15:03
Sorry, but I am still confused. If I am reading this correctly you want to deploy the app which is not bound to anything? What value are you trying to get out of it? I guess this is more of an architectural question and framework may or may not support the architecture you envision. So for now, I guess I want to get more clarity on #3
– Oleg Zhurakousky
Nov 20 '18 at 15:39
@Oleg .. the specific micro service have some other functionality which need to be working after the deployment. I want to push my code related to spring cloud streams with out any configuration or disabling it until the other team starts pushing messages to this specific kafka topic. I could keep these changes in a feature branch until its ready .. but I am looking to see if there is a option to disable these binders. Let me know if its still not clear.
– user2225713
Nov 20 '18 at 15:46