AMQP client from AWS lambda that works with Solace

Hi, we would like to publish to Solace topic from AWS lambda ( written in java). Is there any java AMQP client library that we can use to do that ?

Comments

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 959 admin
    edited October 2021 #2

    Hey @rsingh81,

    The Solace Broker supports AMQP 1.0, so as long as you're using a client library that works with v1.0 you should be fine. We usually see folks use the QPID library.

    Note that if you're not already familiar with AMQP it can be confusing to get started so you might consider using a MQTT, JMS, or SMF library. From a Lambda function it might even make sense to use REST messaging as you may not need to include extra libraries. If you go to https://solace.dev, scroll down to "Connect Using a Supported Client Library" and choose "Java" you'll see some of the options available.

    Hope that helps!

  • Tamimi
    Tamimi Member, Administrator, Employee Posts: 538 admin

    Hey @rsingh81, feel free to share your findings here as well!

  • rsingh81
    rsingh81 Member Posts: 2

    We have gone ahead with the REST based calls.
    That said, we still want to load test our calls from AWS lambda
    We will have about 50k records to be published to Solace.
    Is it better for us to publish as batches ?

  • Tamimi
    Tamimi Member, Administrator, Employee Posts: 538 admin

    Hey @rsingh81 - if everyone of those 50k records will be processed by an AWS Lambda function call, then you can publish each record separately from your lambda function. I am not sure how your lambda function architecture is setup but a batch approach could also work.

    How are you processing your 50k records?

  • ranjitsingh
    ranjitsingh Member Posts: 6
    edited January 2022 #6

    Thanks @Tamimi, sorry it took so long to get back to this.
    Our logic to call from AWS lambda is written in java
    something like this

    1. Call to lambda Handler Function -> 2. Get all the records in one go to publish downstream -> 3.Calls Solace REST publishiser look something like this

    My preference is to publish one records at a time, as then it can be more elegantly handled on the consumer side. I am bit concerned how will AWS lambda work underneath the hood when connecting to Solace broker i.e. if we perform step 3 above for each of the 50k record, I don't want to hog the available connections for the Solace pub/sub +. Would you be able to advise on this whether connections will be reused or created one for each record published to Http?