Coder Social home page Coder Social logo

jmix-cloudqueue's Introduction

Jmix Cloud Queue

This repository contains AWS Queue project of the Jmix framework.

CAUTION: The project is in EXPERIMENTAL status and may be removed or modified in any way without notice. Use at your own risk!

For more information see:

Usage

Add to your project's build.gradle dependencies:

implementation 'io.jmix.cloudqueueui:jmix-cloudqueue-ui-starter'

For AWS Queue:

implementation 'io.jmix.cloudqueueui:jmix-cloudqueue-aws-starter'

For Yandex Queue:

implementation 'io.jmix.cloudqueueui:jmix-cloudqueue-yandex-starter'

Specify AWS credentials and region in application.properties:

jmix.cloudqueue.aws.region = eu-central-1
jmix.cloudqueue.aws.access-key = AWS_ACCESS_KEY
jmix.cloudqueue.aws.secret-key = AWS_SECRET_KEY

Specify Yandex credentials, region and endpoint in application.properties:

jmix.cloudqueue.yandex.region = ru-central1
jmix.cloudqueue.yandex.access-key = YANDEX_ACCESS_KEY
jmix.cloudqueue.yandex.secret-key = YANDEX_SECRET_KEY
jmix.cloudqueue.yandex.endpoint-configuration = https://message-queue.api.cloud.yandex.net

By default, prefix is not defined and application loads every queue and create queues without any prefix

Add Provider family queues prefix to use only queues with the prefix to restrict queues in your application

jmix.cloudqueue.queue-prefix = jmixqueues

After this ADD-on will create and load only 'jmixqueues' queues with the prefix.

Specify next parameters for Simple Queue Listener in application.properties:

  1. long-polling-timeout - the duration (in milliseconds) after that will be sent new request to aws to check new messages.
  2. waiting-time-receive-request - the duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than WaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list of messages.
  3. max-number-of-messages - the maximum number of messages to return. Queue never returns more messages than this value (however, fewer messages might be returned). Valid values: 1 to 10.
  4. thread-pool-core-size - the number of threads to keep in the pool, even if they are idle. Use in thread pool that serves for handling messages.
jmix.cloudqueue.listener.long-polling-timeout = 10000
jmix.cloudqueue.listener.waiting-time-receive-request = 5
jmix.cloudqueue.listener.max-number-of-messages = 10
jmix.cloudqueue.listener.thread-pool-core-size = 5

jmix-cloudqueue's People

Contributors

andreidenisenko avatar kartndev avatar knstvk avatar vi3ard avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jmix-cloudqueue's Issues

No notification when trying to create queues with the same name

Jmix version: 1.0.0-SNAPSHOT
Jmix Studio plugin version: 1.1.SNAPSHOT3614-212
IntelliJ version: IntelliJ IDEA 2021.2.1 (Ultimate Edition)

Steps:

  1. Create new jmix project
  2. Add and configure Yandex Message Queue component
  3. Launch the app
  4. http://localhost:8080 > Submit > Queues > Queue info
  5. Create two queues with the same name

ER:
Notification about creation of a queue with the same names

AR:
The second queue is not created and there is no notification

NPE occurs after trying to delete just created queue

Environment
Jmix version: 1.1.0-SNAPSHOT
Jmix Studio plugin version: 1.0.SNAPSHOT3074-211
IntelliJ version: IntelliJ IDEA 2021.1.1 (Ultimate Edition)

  1. Configure AWS SQS
  2. Open Queues -> Queue info
  3. Create a new Queue
  4. Delete the created queue

AR: Queue was not deleted and NPE occurs

java.lang.NullPointerException
	at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
	at java.util.concurrent.ConcurrentHashMap$KeySetView.add(ConcurrentHashMap.java:4595)
	at io.jmix.cloudqueue.utils.QueueStatusCache.setDeleting(QueueStatusCache.java:50)
	at io.jmix.cloudqueue.impl.QueueManagerImpl.deleteQueue(QueueManagerImpl.java:136)
	at io.jmix.cloudqueueui.screen.queueinfo.QueueInfoBrowse.onQueueStatesTableRemove(QueueInfoBrowse.java:77)
	at io.jmix.core.common.event.EventHub.publish(EventHub.java:170)
	at io.jmix.ui.action.BaseAction.actionPerform(BaseAction.java:220)
	at io.jmix.ui.action.list.RemoveAction.actionPerform(RemoveAction.java:230)
	at io.jmix.ui.component.impl.ButtonImpl.buttonClicked(ButtonImpl.java:75)
	at io.jmix.ui.widget.JmixButton.fireClick(JmixButton.java:77)
	at com.vaadin.ui.Button$1.click(Button.java:57)
	at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:153)
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:115)
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:431)
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:396)
	at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:260)
	at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:82)
	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40)
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1607)
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:449)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.