Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Artem Bilan
    @artembilan
    For example when a queue backing the channel is full and its offer() returns false. So, we don’t consider this as a fatal situation
    HubertTatar
    @HubertTatar
    So every situation when broker and connections works but from some reason broker informs you it won't process message ?
    Artem Bilan
    @artembilan
    Well, that situation means “ try again later”, but not like a message is wrong or broker resource doesn’t exist
    gopalsai
    @gopalsai
    Hey, How good of a design is it ? too pass the message payload with a huge list of data object from channel A -> Channel B -> Channel C -> Channel D. For using that list Object that got generated in Channel A, in Channel D? I am against it
    I am using that in Channel D because that’s when that process has to be triggered
    Artem Bilan
    @artembilan
    Sorry, not clear what you share. Please, try to elaborate more. Maybe some configuration would be useful
    I even would say that StackOverflow question would be better with much more details and context what you have and what you would like to achieve
    Thanks for understanding
    gopalsai
    @gopalsai
    Ok, no problem. Thank you
    Elias Khattar
    @KhattarElias_twitter
    Hello, I have a project where I need to deal with mail routing, I can see that there is a good potential to be able to do it in spring integration mail and dsl, so the case is that, I have one or many business email address (ex: ek@business.com) and I have two or many other personal emails (ex: ek@personal1.com and ek@personal2.com) , I use the personal emails to register for different blogs so that I do not expose my business email to those blogs directly, now my application will have to monitor those two email addresses and forward the emails received to them from the blogs to my business email, might perform some constraints or filters on the emails but at the first stage no need for filtering. So is there a way I can do that with spring integration? can I have a sample code as to start with?thanks
    Elias Khattar
    @KhattarElias_twitter
    @artembilan @garyrussell , you please assist on the above question
    Gary Russell
    @garyrussell

    @KhattarElias_twitter See the docuentation https://docs.spring.io/spring-integration/docs/5.2.2.RELEASE/reference/html/mail.html#java-dsl-configuration

    There is also a pop3 inbound adapter.

    You can wire the inbound and outbound together in a single flow

    .from(Mail.pop3InboundAdapter(...))
    .handle(Mail.outboundAdapter(...))
    .get();
    Then add .filter(...) betweeen them later.
    Elias Khattar
    @KhattarElias_twitter
    @garyrussell , thank you very much I will take a look into that and see how I can do some configs.
    Haruhiko Nishi
    @hanishi
    @artembilan @garyrussell I am at https://springfest2019.springframework.jp
    There will be a session about Spring Integration given by a person(not me).
    Interesting to know how many people will show up.
    Artem Bilan
    @artembilan
    Great! Say "Hi!" to Stephane Nicoll :smile:
    Elias Khattar
    @KhattarElias_twitter
    @garyrussell , I tried to implement the below flow but it is giving me the error below, can you please enlighten me on the solution or where is my error? thank you
    @Bean
    public IntegrationFlow emailRouting(){
    
        return IntegrationFlows.from(Mail.imapInboundAdapter("imap://username:pw@imap.gmail.com/INBOX")
                                .shouldMarkMessagesAsRead(true)
                                .userFlag("testing")
                                .simpleContent(true)
                                .javaMailProperties(p -> p.put("mail.debug", "false")),
                e -> e.autoStartup(true)
                        .poller(p -> p.fixedDelay(1000)))
    
                        .handle(Mail.outboundAdapter("smtp.live.com")
                                .port(25)
                                .credentials("username","pw")
                                .javaMailProperties(p -> p.put("mail.debug","false"))
                                , e -> e.id("smtpOut"))
                .get();
    }
    ERROR 12880 --- [ask-scheduler-1] o.s.integration.handler.LoggingHandler   : org.springframework.messaging.MessagingException: failure occurred while polling for mail; nested exception is javax.mail.MessagingException: Connection timed out: connect;
    of course the username and passwords are real ones
    Elias Khattar
    @KhattarElias_twitter
    @garyrussell I turned mail debug to true and got the below
    DEBUG: JavaMail version 1.4ea 
    DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jdk1.8.0_131\jre\lib\javamail.providers (The system cannot find the file specified)
    DEBUG: !anyLoaded
    DEBUG: not loading resource: /META-INF/javamail.providers
    DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
    DEBUG: Tables of loaded providers
    DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
    DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
    DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
    DEBUG: !anyLoaded
    DEBUG: not loading resource: /META-INF/javamail.address.map
    DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jdk1.8.0_131\jre\lib\javamail.address.map (The system cannot find the file specified)
    DEBUG: getProvider() returning javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc]
    DEBUG: mail.imap.fetchsize: 16384
    Artem Bilan
    @artembilan
    @KhattarElias_twitter , I think there are much more DEBUG logs from JavaMail. Those not loading is fully not related to your problem.
    Please, read here how to get email from GMail in Java: https://javapapers.com/java/receive-email-in-java-using-javamail-gmail-imap-example/
    Also you need an application-specific password instead of your real one: https://www.lifewire.com/get-a-password-to-access-gmail-by-pop-imap-2-1171882
    Yes, it is in an XML, but shows important parts to be configured for GMail access via IMAP
    Elias Khattar
    @KhattarElias_twitter
    @artembilan perfect, it got well so far, I will do some tests in the coming days , thank you :)
    Attoumane
    @akuma8
    Hi there,
    Does Spring Integration support Message DB https://github.com/message-db/message-db ?
    I am currently using Spring Integration with Redis but I have an issue with the PubSub api.
    I have 5 microservices subscribed to a channel, each one have 3 instances so I have 15 instances, when messages are published the 15 instances receive the message.
    I would like only one instance per service to receive the message.
    It seems like Redis PubSub does not provide a Consumer Group concept so I plan to migrate to another solution.
    I want to avoid Kafka, I find it a bit cumbersome and since I use PostgreSql, Message DB seems to be a good compromise.
    Thanks
    Artem Bilan
    @artembilan
    No, we don't support it (yet).
    It looks like relatively new project and it still doesn't have a Java client
    Not sure what is wrong with Apache Kafka, but looks like it gives you everything what could be done with that Message DB
    Although it might be more "cumbersome" to use this Message DB since there is no Java client and no Spring Integration support
    Plus for Pub/Sub I believe you use Spring Cloud Stream. So, you are in a bad situation even more: you need a binder for this Message DB
    On Redis side there is a feature like this: https://redis.io/topics/streams-intro
    We don't have support in SI, too, but that's already on our roadmap since we have a good Java API from Spring Data side: https://jira.spring.io/browse/INT-4567
    Attoumane
    @akuma8
    Thanks for your explanations. I think we don’t need a specific Java client for Message DB since it is based on Postgresql. Since the goal is to run SQL queries to read/write messages, I think we can use JDBC.
    Artem Bilan
    @artembilan
    Hm. I think this one is going to be too slow in comparison with Kafka or even RabbitMQ. Just because it is based on RDBMS with strict schema and transactions :shrug:
    Attoumane
    @akuma8
    Haha good point 👍🏼
    Jason Lee
    @jasondlee
    Good morning! I have a question about spring and the azure service bus. Mark Heckler sent me, so I hope this is the right place. if not, i'll happily accept a redirect. :) can anyone help me? I can "just ask", but I'd like to avoid spamming the channel too much :)
    Artem Bilan
    @artembilan
    Yeah... You can ask here questions about Spring Integration project: https://spring.io/projects/spring-integration
    But there's indeed no experts in Azure over here
    Jason Lee
    @jasondlee
    hrm... ok :)
    the gist of it is this: i'm trying to create a @JmsListener. I've provided the topic name ("alerts-topic"), and I've set spring.jms.servicebus.connection-string to the connection string we got from the Shared Access Policies , but I keep getting either access denied messages to amqp:not-found
    not sure how to go about debugging that. or even if the topic name (JmsListener.destination) is in the right format
    Artem Bilan
    @artembilan
    Right, sounds more like Azure question.
    Jason Lee
    @jasondlee
    yeah, that's what I was afraid of :)
    Artem Bilan
    @artembilan
    Please, consider to ask it on StackOverflow or respective Azure forum
    Jason Lee
    @jasondlee
    will do. thanks!
    Jason Lee
    @jasondlee
    for the record, I haven't forgotten about the SO post in case you're watching for it. through some rubber ducky testing (and I'll be honest, a fair bit of fiddle-with-it-until-it-works), I figured out the magic sauce to make it work: the value for destination needed to be "$TOPIC/subscriptions/$SUBSCRIPTION". not sure if I should be using the subscription attribute or not, but it's working, so I'm pretty happy with that :)