question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for variable/property expansion in @Input/@Output @StreamListener annotations

See original GitHub issue

I have a need to do this:

@Output("${my.prop.name}")
    public MessageChannel myOutboundChannel();

But KafkaMessageChannelBinder receives the raw value, not replaced w/ the system/app property and dies here:

public static void validateTopicName(String topicName) {
        try {
            byte[] utf8 = topicName.getBytes("UTF-8");
            for (byte b : utf8) {
                if (!((b >= 'a') && (b <= 'z') || (b >= 'A') && (b <= 'Z') || (b >= '0') && (b <= '9') || (b == '.')
                        || (b == '-') || (b == '_'))) {
                    throw new IllegalArgumentException(
                            "Topic name can only have ASCII alphanumerics, '.', '_' and '-'");
                }
            }
        }
        catch (UnsupportedEncodingException e) {
            throw new AssertionError(e); // Can't happen
        }
    }

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bitsofinfocommented, Sep 15, 2016

I understand those other options, its just that I’m trying to create a re-usable component someone can drop in their app. The channel name itself can vary in each app that uses an instance of this component. Hence I need that configurable rather than hardwired.

0reactions
olegzcommented, Feb 23, 2018

Closing it due to the age if the issue and the amount of changes that went in after that. If you feel you still need this feature please raise a new issue taking into account latest functionality

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Cloud Stream Reference Guide
You can write a Spring Cloud Stream application using either Spring Integration annotations or Spring Cloud Stream's @StreamListener annotation. The @ ...
Read more >
EnableBinding @deprecated as of 3.1 in favor of functional ...
1.0, SCS (Spring Cloud Stream) worked as annotation-based programing (just as the previous guide). From this version, SCS preferred way of work ...
Read more >
Spring Cloud Streams With Functional Programming Model
This story talks about writing Spring Cloud Functions using Java Functional Program. Before that, we can write using @EnableBinding, @Input, ...
Read more >
Introduction to Spring Cloud Stream - Baeldung
To get started, we'll need to add the Spring Cloud Starter Stream with the ... Using the @StreamListener annotation, we also can filter...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found