io.bpic.aws:aws-sqs-rar

Amazon SQS JMS Resource Adapter

Лицензия

Лицензия

Категории

Категории

AWS Контейнер PaaS Providers
Группа

Группа

io.bpic.aws
Идентификатор

Идентификатор

aws-sqs-rar
Последняя версия

Последняя версия

1.0.3
Дата

Дата

Тип

Тип

rar
Описание

Описание

Amazon SQS JMS Resource Adapter
Система контроля версий

Система контроля версий

http://github.com/bpicio/aws-sqs-ra/tree/master/aws-sqs-rar

Скачать aws-sqs-rar

Имя Файла Размер
aws-sqs-rar-1.0.3.pom
aws-sqs-rar-1.0.3.rar 4 MB
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.bpic.aws/aws-sqs-rar/ -->
<dependency>
    <groupId>io.bpic.aws</groupId>
    <artifactId>aws-sqs-rar</artifactId>
    <version>1.0.3</version>
    <type>rar</type>
</dependency>
// https://jarcasting.com/artifacts/io.bpic.aws/aws-sqs-rar/
implementation 'io.bpic.aws:aws-sqs-rar:1.0.3'
// https://jarcasting.com/artifacts/io.bpic.aws/aws-sqs-rar/
implementation ("io.bpic.aws:aws-sqs-rar:1.0.3")
'io.bpic.aws:aws-sqs-rar:rar:1.0.3'
<dependency org="io.bpic.aws" name="aws-sqs-rar" rev="1.0.3">
  <artifact name="aws-sqs-rar" type="rar" />
</dependency>
@Grapes(
@Grab(group='io.bpic.aws', module='aws-sqs-rar', version='1.0.3')
)
libraryDependencies += "io.bpic.aws" % "aws-sqs-rar" % "1.0.3"
[io.bpic.aws/aws-sqs-rar "1.0.3"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
io.bpic.jakartaee.ra » aws-sqs-jca-api jar 1.0.0-SNAPSHOT

provided (1)

Идентификатор библиотеки Тип Версия
org.jboss.ironjacamar : ironjacamar-spec-api jar 1.2.6.Final

Модули Проекта

Данный проект не имеет модулей.

Amazon SQS JMS Resource Adapter

Maven Central

Getting Started

Installation

For Wildfly, copy aws-sqs-rar-[VERSION HERE].rar to your application server deployment folder. In standalone it should be:

$WILDFLY_HOME/standalone/deployments

Either reference the resource adapter on your MDB using:

@ResourceAdapter("aws-sqs-rar-[VERSION HERE].rar")

Or by setting as the default adapter on standalone-full.xml:

<subsystem xmlns="urn:jboss:domain:ejb3:6.0">
    ...
    <mdb>
        <resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:activemq-ra.rar}"/>
        ...
    </mdb>
    ...
</subsystem>

Then create a queue:

<subsystem xmlns="urn:jboss:domain:resource-adapters:5.0">
    <resource-adapters>
        <resource-adapter id="aws-sqs-rar-[VERSION HERE].rar">
            <archive>
                aws-sqs-rar-${project.version}.rar
            </archive>
            <transaction-support>NoTransaction</transaction-support>
            <admin-objects>
                <admin-object class-name="io.bpic.aws.sqs.ra.SQSJMSQueue" jndi-name="java:jboss/sqs/queue/QueueName" pool-name="QueuePool">
                    <config-property name="queueName">[QUEUE NAME]</config-property>
                </admin-object>
            </admin-objects>
        </resource-adapter>
    </resource-adapters>
</subsystem>

Inbound MDB

To receive messages you must implement the MessageListener interface.

public class ReceiveSQSMDB implements MessageListener {
   
} 

Also you must set the ActivationConfigProperty values suitable for your MDB.

Valid properties are below.

Config Property Name Type Default Notes
awsAccessKeyId String None Must be set to the access key of your AWS account (Optional)
awsSecretKey String None Must be set to the secret key of your AWS account (Optional)
destination String None JNDI queue name
region String None Must be set to the AWS region name of your queue. (Optional)

Your MDB should contain one method annotated with @OnMessage

A full skeleton MDB is shown below

@MessageDriven(activationConfig = {
    @ActivationConfigProperty(propertyName = "awsAccessKeyId", propertyValue = "${ENV=accessKey}"),
    @ActivationConfigProperty(propertyName = "awsSecretKey", propertyValue = "${ENV=secretKey}"),
    @ActivationConfigProperty(propertyName = "destination", propertyValue = "${ENV=destination}"),   
    @ActivationConfigProperty(propertyName = "region", propertyValue = "eu-west-2")    
})
@ResourceAdapter("aws-sqs-rar-[VERSION HERE].rar")
public class ReceiveSQSMDB implements MessageListener {

    @OnMessage
    public void receiveMessage(Message message) {
        System.out.println("Got message " + message.getBody());
    }
}

License

This project is licensed under the GNU AGPLv3 License - see the LICENSE.md file for details

io.bpic.aws

BP Internet

Версии библиотеки

Версия
1.0.3
1.0.2
1.0.1
1.0.0