sqsmock


License

License

MIT
GroupId

GroupId

io.findify
ArtifactId

ArtifactId

sqsmock_2.12
Last Version

Last Version

0.4.1
Release Date

Release Date

Type

Type

jar
Description

Description

sqsmock
sqsmock
Project URL

Project URL

https://github.com/findify/sqsmock
Project Organization

Project Organization

io.findify
Source Code Management

Source Code Management

https://github.com/findify/sqsmock

Download sqsmock_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/io.findify/sqsmock_2.12/ -->
<dependency>
    <groupId>io.findify</groupId>
    <artifactId>sqsmock_2.12</artifactId>
    <version>0.4.1</version>
</dependency>
// https://jarcasting.com/artifacts/io.findify/sqsmock_2.12/
implementation 'io.findify:sqsmock_2.12:0.4.1'
// https://jarcasting.com/artifacts/io.findify/sqsmock_2.12/
implementation ("io.findify:sqsmock_2.12:0.4.1")
'io.findify:sqsmock_2.12:jar:0.4.1'
<dependency org="io.findify" name="sqsmock_2.12" rev="0.4.1">
  <artifact name="sqsmock_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.findify', module='sqsmock_2.12', version='0.4.1')
)
libraryDependencies += "io.findify" % "sqsmock_2.12" % "0.4.1"
[io.findify/sqsmock_2.12 "0.4.1"]

Dependencies

compile (6)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.13
com.typesafe.akka : akka-stream_2.12 jar 2.6.14
com.typesafe.akka : akka-slf4j_2.12 jar 2.6.14
com.typesafe.akka : akka-http_2.12 jar 10.2.4
org.scala-lang.modules : scala-xml_2.12 jar 1.3.0
joda-time : joda-time jar 2.10.10

test (2)

Group / Artifact Type Version
org.scalatest : scalatest_2.12 jar 3.0.9
com.amazonaws : aws-java-sdk-sqs jar 1.11.1000

Project Modules

There are no modules declared in this project.

SQS mock library for Java/Scala

Build Status Maven Central License: MIT

Sqsmock is a web service implementing AWS SQS API, which can be used for local testing of your code using SQS but without hitting real SQS endpoints.

Implemented API methods:

  • CreateQueue (supported params: VisibilityTimeout)
  • DeleteMessage
  • ReceiveMessage (supported params: MaxNumberOfMessages)
  • SendMessage
  • SendMessageBatch

Installation

Sqsmock package is available for Scala 2.12 (on Java 8) on Maven Central. To install using SBT, add these statements to your build.sbt:

libraryDependencies += "io.findify" %% "sqsmock" % "0.4.1" % "test",

On maven, update your pom.xml in the following way:

// add this entry to <repositories/>

// add this entry to <dependencies/>
<dependency>
    <groupId>io.findify</groupId>
    <artifactId>sqsmock_2.12</artifactId>
    <version>0.4.1</version>
    <type>pom</type>
    <scope>test</scope>
</dependency>

Usage

Scala:

// create and start SQS API mock
val api = new SQSService(port = 8001, account = 1)
api.start()

// AWS SQS client setup
val credentials = new AnonymousAWSCredentials()
val client = new AmazonSQSClient(credentials)
client.setEndpoint("http://localhost:8001")

// use it as usual
val queue = client.createQueue("hello").getQueueUrl()
client.sendMessage(queue, "world")

Java:

// create and start SQS API mock
SQSService api = new SQSService(8001, 1);
api.start();

// AWS SQS client setup
AWSCredentials credentials = new AnonymousAWSCredentials();
AmazonSQSClient client = new AmazonSQSClient(credentials);
client.setEndpoint("http://localhost:8001");

// use it as usual
String queue = client.createQueue("hello").getQueueUrl();
client.sendMessage(queue, "world");

License

The MIT License (MIT)

Copyright (c) 2016 Findify AB

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

io.findify

Findify

Findify repository

Versions

Version
0.4.1
0.4.0