Skip to content

javiercanillas/spring-cloud-aws-messaging-in-memory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-cloud-aws-messaging-in-memory

Does it happen to you that your Spring-boot application uses an Amazon SQS service through spring-cloud-aws-messaging dependency and you depend on an internet connection on your local or development environment? Well, this little dependency tries to supply the same behaviour as Amazon SQS by using in-memory Java Queues and DelayedQueues.

Java CI with Maven Quality Gate Status Coverage

How does it work?

Well, The entry point to send and receive message is QueueMessagingTemplate, so basically I provide my own version of it. After that, I needed to add funtionally for the auto-discovery of the annotated consumer methods and bind them to the internal implementation of java Queues.

Sounded easy right? Take a look at the code, pull-reuests with improvements are welcomed!

Note: If you consider there is something missing, feel free to contact me.

How to use

Simple, probably you have already added the spring-cloud-aws-messaging dependency, so you only need to follow these simple steps:

  • Add this dependency to your classpath (check How to install)
  • After that remember to import its configuration like the following:
import org.springframework.context.annotation.Import;

@Configuration()
@Import(io.github.javiercanillas.amazonws.services.sqs.InMemoryQueueMessagingTemplate)
public class LocalConfiguration {
    ...
}
  • And turn into false the following property:
cloud.aws.sqs.enabled=false

By doing so, your are turning-off the real SQS support.

How to install

If you prefer to use maven central releases, you can find it here. Also, if you support Jitpack.io you can find it here

About

In-memory Spring cloud AWS messaging

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages