Giter Club home page Giter Club logo

grails-rabbitmq-native's People

Contributors

aaron-brown avatar budjb avatar davidsawyer avatar dbpatel219 avatar earzur avatar gevorg avatar jakon89 avatar jeremycrosbie avatar lodnert avatar marcdesantis avatar raibaz avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

grails-rabbitmq-native's Issues

2.0.6 version of the update to 3.1.0

I am updating the plugin grails-rabbitmq-native version 2.0.6 to 3.1.0 and am having the following problem when climbing the application:

I have a Consumer seen the import of MessageContext changed and so did the change, there is another change needed, use the Grails 2.1.4?

Update to amqp-client 4.0.0

The new client has some advantages, like server metrics collection.

It might be worth to add a configurable way to expose the metrics to JMX, Controllers, etc.
Maybe with a simple Controller / view to show the RabbitMQ Server metrics.

setAutomaticRecoveryEnabled() is applicable for argument types: (java.lang.Boolean) values: [true]

Works fine with grails run-app but not in production.
Im getting this error :
2015-07-06 13:28:53,625 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
groovy.lang.MissingMethodException: No signature of method: com.rabbitmq.client.ConnectionFactory.setAutomaticRecoveryEnabled() is applicable for argument types: (java.lang.Boolean) values: [true]
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
...

JRE 1.8
Plugin version : 3.1.0

Bindings fail for environment variables

When using an environment variable to create Queue bindings, the binding fails. Hard-coding this value works.

Sample:

rabbitmq {
    queues = {
        exchange name: "foo", type: "topic", {
            queue(
                name: "foo.${System.getenv()['MY_ENV_VAR']}.bar.baz",
                binding: "${System.getenv()['MY_ENV_VAR']}.bar.baz",
                durable: true,
            )
    }
}

Start RabbitMQ listener manually

I need to prepare app context in Bootstrap before consuming messages from RabbitMQ.
But RabbitMQ listener starts automatically.
Is it possible to disable autostartup and run listener manually after Bootstrap work?

Hibernate session issues

With the latest version I am getting:
an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): org.hibernate.AssertionFailure: null id in ca.xxxxxh.FareCountByVendor entry (don't flush the Session after an exception occurs)

Previous 1.0.2 with exactly the same code does not exhibit this problem.

Suggestions ?

Blocker - Exception thrown in handleMessage() causing unacked messages on queue

Hi Bud,

We are experiencing a situation were messages get stuck in the queue in an unacked and not-ready state.

This is a biggie for us. As we can't have our messages sitting in an unack state on the queue of course and we are 2 weeks from going live. We have some thoughts on a solution for now. Please add your insights asap as you can. We would hate to have to drop your plugin at this point.

Our thoughts on a solution is something like adding a finally clause in the handleMessage() that will force an nack as appropriate, but we have not tried this approach yet, nor looked closer at your code. So any insights you have here would be so valuable to us as we stumble through this.

fyi, we saw your closed issue #54 which we added and appears to at least clear the unacked messages on tomcat start up.

Thanks, Jim (IQNavigator)

Our handleMessage():

def handleMessage(def body, MessageContext context) {
    log.info("Notification Consumer started without error")
    NotificationRequest request = new NotificationRequest()
    try {

        request.notificationType = body.notificationType
        request.orgGuid = body.orgGuid
        request.personGuid = body.personGuid
        request.oneTimeUseFlag = body.oneTimeUseFlag
        request.expirationDate = body.expirationDate
        request.entityName = body.entityName
        request.entityGuid = body.entityGuid

        // TODO Replace the following with the proper service call when available
        // notificationTemplateService.handleRequest(request)
        if (request.notificationType == "RESET_PASSWORD")
            notificationSendService.send(request, "Password Reset", "_password_reset")
        else if (request.notificationType == "VERIFY_EMAIL")    
            notificationSendService.send(request, "User Email Validation", "_user_email_verification")

    } catch (Exception e) {
        log.error("Exception processing queued notification: ${request as JSON}", e)
        throw e
    }
    log.info("Notification Consumer completed without error")
}

Sample stack trace:

2015-04-24 12:54:31,369 ERROR grails.app.rabbit-consumers.com.iqn.falcon.business.notification.NotificationConsumer {pool-11-thread-2}
[g.a.r.c.i.f.b.n.NotificationConsumer] : Exception processing queued notification
java.lang.NullPointerException: null
at java.net.URI$Parser.parse(URI.java:3023) ~[na:1.7.0_55]
at java.net.URI.(URI.java:595) ~[na:1.7.0_55]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_55]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[na:1.7.0_55]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.7.0_55]
at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[na:1.7.0_55]
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) ~[groovy-all-2.3.7.jar:2.3.7]
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:10
2) ~[groovy-all-2.3.7.jar:2.3.7]
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57) [groovy-all-2.3.7.jar:2.3.7]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182) [groovy-all-2.3.7.jar:2.3.7]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190) [groovy-all-2.3.7.jar:2.3.7]
at grails.plugin.mail.MailMessageContentRenderer$PageRenderRequestCreator.createInstance(MailMessageContentRenderer.groovy:198) ~[MailMessageContentRenderer$PageRenderRequestCreator.class:na]
at grails.plugin.mail.MailMessageContentRenderer$PageRenderRequestCreator$createInstance.call(Unknown Source) ~[na:na]
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) [groovy-all-2.3.7.jar:2.3.7]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) [groovy-all-2.3.7.jar:2.3.7]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124) [groovy-all-2.3.7.jar:2.3.7]

Suppress Warnings

Include warning suppression to remove the deprecated API warning on compiles:

Note: /tmp/groovy-generated-4986106633368356473-java-source/com/budjb/rabbitmq/RabbitConsumer.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

How to delay initialization of connections?

So currently, everything works as needed (so thanks for that). But recently I found a need to define queue names based on a different config value. Unfortunately, this config value needs to be overridden in an external config file for production environments. But because of the order of things, I don't see how this is possible. For example, here's code in the config:

appId = "some default id"
rabbitmq {
    connection {
        host = "localhost"
        port = 5672
        username = "guest"
        password = "guest"
    }
    queues = {
        exchange name: "exchange_name", durable: true, type: "topic", {
            queue name: "queue_name", durable: true, binding: "some_binding"
        }
    }
}

But the names of the exchange and queue needs to be dependent on appId (appId is used elsewhere in the application and changes per environment, so that's why it is a separate item, instead of automatically embedded in the names). So you'd think you can just use exchange name: "exchange${appId}". While that's true, an external file is loaded with grails.config.locations = ["some file path"], and it won't replace the value in the exchange/queue names.

Do you know of something I can do differently with the plugin to make this work? Or something with Grails to get by this? It just seems like I need to configure this plugin after the config is loaded (but before Bootstrap)? Any suggestions?

factory.automaticRecovery exceeds access rights

Hi,

I'm getting a compilation error when trying to boot up my application and it appears to be down to line 175 of ConnectionContext.groovy where you are attempting to set a private variable:

factory.automaticRecovery = automaticReconnect

Am I missing something here or is it a bug? When I hack it and comment out the line the application boots up just fine.

Way to bind consumer to multiple connections

In a multi-server setup, e.g. there are two connections, is there a way to bind a consumer to both connections?

Or I guess it makes more sense to have an instance of that consumer for each connection.

The doc only seems to support a single connection per consumer: http://budjb.github.io/grails-rabbitmq-native/3.x/latest/ref/Consumer%20Configuration/connection.html Is there a way to avoid making an identical copy of the same consumer class to support multiple connections?

Central configuration leads to not usable consumers

Hi,
I'm using the plugin's latest.release version with grails 2.5.0.
I'm trying to move a consumer declaration to Config.groovy. For that, I remove the static rabbitConfig from my consumer class, then in Config.groovy I set :

rabbitmq {
   // ...
    connection = {
        connection host: "localhost", username: "someuser", password: "12345", virtualHost : "somehost"
    }
    consumers {
        MyConsumer {
            queue = "some.queue"
        }
    }
}

But now when I start my app, I get :

2015-11-12 11:55:42,257 -0500 [localhost-startStop-1] WARN  ConsumerConfigurationImpl:?  - consumer is not valid because is has both a queue and an exchange defined
2015-11-12 11:55:42,258 -0500 [localhost-startStop-1] WARN  ConsumerConfigurationImpl:?  - match must be either 'any' or 'all'
2015-11-12 11:55:42,258 -0500 [localhost-startStop-1] WARN  ConsumerContextImpl:?  - not starting consumer 'MyConsumer' because it is not valid

When I step-debug through ConsumerContextImpl, I notice that exchange = [:] in the isValid method, after getConfiguration().

Also, the connection is set to [:] despite a connection being explicitly set as above.

waitForConfirmsOrDie

I would like to be able to call

channel.waitForConfirmsOrDie()

Here is an example of its usage
http://hg.rabbitmq.com/rabbitmq-java-client/file/default/test/src/com/rabbitmq/examples/ConfirmDontLoseMessages.java

Current workaround is obtaining RabbitContext and creating the channel manually. Then call waitForConfirmsOrDie().

It would be nice to have this method opened up as apart of RabbitMessageBuilder API.

Thank you for creating this project. It's concise and simple. However, I still feel that I have full access to native RabbitMQ client API library.

Add configuration to disable plugin

Running tests fails is there is not a RabbitMQ connection configuration and a RabbitMQ server runnning.
It would be nice to have an option to disable this plugin in some environments.

Match consumer by annotation

Hi,

At present when we need to define consumer we have to:

  1. register consumer in application.groovy
  2. put our consumer to grails-app/rabbit-consumers

First solution is ok, but second is not. Adding new directory (rabbit-consumers) brekas default groovy application structure. I think there shouldn't be anything more than services, models and controllers.
For our own application sources, default directory should be src/groovy (as in rabbit-mq native plugin).
I rather prefer to put my code anywhere - I don't like when plugni/framework forces me to keep sources here or there and scream 'put in rabbit-consumers !' or ' it should end with Consumer.groovy !'
It's my point of view of course.

But there is solution :)
We can define our consumers by annotating them.
For example:

@Consumer
class IncomingConsumer extends MessageConsumer{
}
@Consumer
class MyAwesomeClass extends MessageConsumer{
}

rest will be like in old version: config, handeMessage.

It's easy to implement, we only have to scan our application packages( for example: 'com.jakon'), but spirng provides org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider and it do all magic.
We also need to register this consumers as spring bean in old way:

.each { GrailsClass clazz ->
            "${clazz.propertyName}"(clazz.clazz) { bean ->
                bean.autowire = true
            }
        }

Problem with @Transactional

I have a consumer whose handleMessage contents needed to be wrapped in a withTransaction { ... } block. I did that, and everything worked perfectly.

In order to clean that up a little bit, though, I tried adding the @Transactional annotation to the class. However, when I start up my app, I get unable to retrieve configuration for consumer MyConsumer.... My app starts up completely afterwards, but that consumer won't receive messages.

Not totally sure what could be causing that error. Would you have any ideas and/or solutions?

Additional HandleMessage signature.

For convenience, propose adding an additional (or two additional instead of = null) signature which handles the boiler-plate model of retrieving the replyTo key out of the MessageContext.

example:

handleMessage(def requestBody, String replyTo, MessageContext context = null) {
    // ...

    new RabbitMessageBuilder().replyTo {
        routingKey = replyTo
        // ...
    }
}

Obviously, this is intended for RPC messages, so not sure what the appropriate / graceful way to handle a null replyTo would be off the top of my head.

3.2.0 not tagged

Figured out that 3.2.0 is released to bintray but it seems it's not tagged in the repo.

MissingMethodException: getParameterCount() on Consumer

I am getting below exception while consuming message. It is not even going to TaskConsumer which is my consumer class.

Version using : compile "org.grails.plugins:rabbitmq-native:3.3.1"

INFO com.budjb.rabbitmq.connection.ConnectionContextImpl - connecting to RabbitMQ server 'defaultConnection' at 'localhost:5672' on virtual host '/'
ERROR com.budjb.rabbitmq.consumer.ConsumerContextImpl - unexpected exception class groovy.lang.MissingMethodException encountered in the rabbit consumer associated with handler TaskConsumer
groovy.lang.MissingMethodException: No signature of method: java.lang.reflect.Method.getParameterCount() is applicable for argument types: () values: []
Possible solutions: getParameterTypes()
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at

dynamic queue

hi, in a chat room environment, i'd like to provide private messaging feature, which will require a new queue for each new registered user. however queues are created in 'config.groovy' file and are static. is it possible to create a queue at runtime and do you think this is the right way to go for this scenario. thanks.

Tomcat fails to shutdown due to reconnection failure

I started integrating this plugin into my application this week and yesterday was able too successfully get messages queued up on an Amazon EC2 server that is running Tomcat 7. Immediately we noticed that our Tomcat instance no longer can shutdown properly using its shutdown.sh script due to what appears to be a reconnection failure to the RabbitMQ server. Once the plugin is disabled, Tomcat can shutdown normally.

Here is the stack trace we are seeing during the shutdown process:

@
/shutdown
        at com.budjb.rabbitmq.RabbitContext.start(RabbitContext.groovy:78)
        at RabbitmqNativeGrailsPlugin.restartRabbitContext(RabbitmqNativeGrailsPlugin.groovy:224)
        at RabbitmqNativeGrailsPlugin$_closure2.doCall(RabbitmqNativeGrailsPlugin.groovy:152)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error; reason: java.net.SocketException: Connection reset
        at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:67)
        at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:33)
        at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:343)
        at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:216)
        at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:118)
        ... 13 more
Caused by: java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:196)
        at java.net.SocketInputStream.read(SocketInputStream.java:122)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
        at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:288)
        at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:95)
        at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:131)
        at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:515)

Is there any work around for this, or am I completely missing something in the documentation?

Thank you for your assistance in advance.

Cannot parse configuration

I've tried configuring this in both application.groovy and application.yml and neither works. The errors I get are:

With application.groovy

java.lang.ClassCastException: java.lang.String cannot be cast to groovy.lang.Binding

This is due to the binding = '#' setting in:

queues {
        "queue.name" {
            exchange = "wwt.product-catalog.product.creation"
            binding = '#'
        }
    }

With application.yml

ERROR org.springframework.boot.SpringApplication - Application startup failed
com.budjb.rabbitmq.exception.InvalidConfigurationException: exchange type is required

This happens even when the exchange type is specific:

exchanges:
    exchange.name:
      durable: true
      type: topic

When using generate-consumer an arraylist is added

When you generate-consumer mytest.Foo you will have a template created that makes the rabbitConfig = [] when it should be rabbitConfig = [:]

So if you dont have anything defined yet and try to start the app you get an error like:

[GrailsContextLoader] Error executing bootstraps: Could not find matching constructor for: com.budjb.rabbitmq.ConsumerConfiguration(java.util.ArrayList) groovy.lang.GroovyRuntimeException: Could not find matching constructor for: com.budjb.rabbitmq.ConsumerConfiguration(java.util.ArrayList)

RPC doesn't allow for connecting to queues

Whenever I try to send an RPC to a queue (using the 'routingKey', and having no exchange referenced), the request simply times out.

Is it not possible to RPC to a queue? Is it an 'exchange-only' concept?

java.util.concurrent.TimeoutException in com.rabbitmq.utility.BlockingCell

From time to time, I get the following exception in a Soap Client when calling RabbitMessagePublisherImpl.send:

08:32:35.010 [ajp-nio-8009-exec-12] [] DEBUG org.springframework.ws.soap.server.SoapMessageDispatcher - Endpoint invocation resulted in exception - responding with Fault
java.util.concurrent.TimeoutException: null
at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:76) ~[amqp-client-3.6.6.jar:3.6.6]
at com.rabbitmq.utility.BlockingCell.uninterruptibleGet(BlockingCell.java:110) ~[amqp-client-3.6.6.jar:3.6.6]
at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36) ~[amqp-client-3.6.6.jar:3.6.6]
at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:372) ~[amqp-client-3.6.6.jar:3.6.6]
at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:583) ~[amqp-client-3.6.6.jar:3.6.6]
at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:508) ~[amqp-client-3.6.6.jar:3.6.6]
at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:501) ~[amqp-client-3.6.6.jar:3.6.6]
at com.rabbitmq.client.impl.recovery.AutorecoveringChannel.close(AutorecoveringChannel.java:67) ~[amqp-client-3.6.6.jar:3.6.6]
at com.rabbitmq.client.Channel$close$14.call(Unknown Source) ~[na:na]
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) ~[groovy-2.4.5.jar:2.4.5]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) ~[groovy-2.4.5.jar:2.4.5]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117) ~[groovy-2.4.5.jar:2.4.5]
at com.budjb.rabbitmq.publisher.RabbitMessagePublisherImpl.send(RabbitMessagePublisherImpl.groovy:81) ~[rabbitmq-native-3.3.2.jar:na]

And then the thread hangs forever. I need to restart my application to get the client working again.

java client 10 releases out of date - request upgrade to current release

I am evaluating this plugin and noticed right away that your config file shows you are stilling using 3.3.0 rabbitmq java client in your current release which appears to be 10 releases behind.

Can you please respond with whether this is intentional, and when you plan to get this back on track or closer to the current 3.4.3 release? I imagine a new release is in the works soon?

Also you appear to be the only major grails rabbitmq plugin with good code support ongoing which I commend. Can you tell me how committed this project is to continuing forward as we would be adding this plugin in to a major enterprise class project requiring support for quite some time.

Optionally consumers starting

Hi,
I wonder why Consumers are not loading when system starts.
I spent about 15 hours on research(and learning) in plugin code and I realy don't see any reasons.
I'm talking about 189 line in RabbitmqNativeGrailsPlugin.

However, I did some improvements and plugin successfully works with grails 3. I will make pull request soon.

Can I make my independent fork of this project? I have few ideas which i want provide.

Regards, Adam

unable to resolve class RabbitMessagePublisher

I am using:
Grails 3.0.1
JDK 1.7
rabbitmq-native 3.1.1


build.gradle

dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-dependencies"
compile "org.grails:grails-web-boot"
compile "org.grails.plugins:hibernate"
compile "org.grails.plugins:cache"
compile "org.hibernate:hibernate-ehcache"
compile "org.postgresql:postgresql:9.4-1201-jdbc41"
compile "org.grails.plugins:quartz:2.0.0.M4"
compile "org.grails.plugins:mail:2.0.0.RC1"
compile "org.grails.plugins:rabbitmq-native:3.1.1"
compile 'joda-time:joda-time:2.7'
compile "org.codehaus.groovy.modules.http-builder:http-builder:0.7"
runtime "org.grails.plugins:asset-pipeline"
runtime "org.grails.plugins:scaffolding"
testCompile "org.grails:grails-plugin-testing"
testCompile "org.grails.plugins:geb"
// Note: It is recommended to update to a more robust driver (Chrome, Firefox etc.)
testRuntime 'org.seleniumhq.selenium:selenium-htmlunit-driver:2.44.0'
console "org.grails:grails-console"
}


In my groovy class, I am trying to use the RabbitMessagePublisher class
import com.budjb.rabbitmq.publisher.*

But I am getting the following error: unable to resolve class RabbitMessagePublisher

The plugin does appear in my External Libraries on my project.

Please can you point me in the right direction.
Regards
Sophia

Pending messages not processed on consumer start

I'm new to RabbitMQ and face an issue on processing pending messages in a queue when starting a consumer. Only new messages are processed by the consumer, but pending messages already in the queue on start of the consumer are ignored.

Possibly a config problem on my side.

This is a microservice application architecture.
The main application configures rabbitmq exchanges and queues and a microservice application consumes messages for a specific queue topic ('g.m.msg.entry.new') send by the main application.
I expect that messages already in queue "entryQueue" are picked up by the subscribed consumer on start, but as written, this does not happen.

Main Application rabbitmq-native (2.0.10) config:

rabbitmq {
    connection = {
            connection host: "localhost", username: 'xxx', password: 'yyy'
    }
    queues = {
        exchange name: 'messageExchange', type: "topic", durable: true, autoDelete: false, {
             queue name: 'messageQueue', binding: 'g.m.msg', type:topic, durable: true
             queue name: 'entryQueue', binding: 'g.m.msg.entry.#', type:topic, durable: true
             queue name: 'logQueue', binding: '#', type:topic, durable: true
        }
        // dead letter exchange keeps all rejected messages
        exchange name: 'deadLetterExchange', type: direct, durable:true, autoDelete:false, {
            queue name: 'deadLetterQueue', durable:true, arguments:["x-dead-letter-exchange":"deadLetterExchange"]
        }
    }
}

Consumer application Config.groovy:

rabbitmq {
    connection = {
        connection host: "localhost", username: 'xxx', password: 'yyy', automaticReconnect: true
    }
}

Consumer:

class EntryConsumer {
    static rabbitConfig = [
        "exchange":'messageExchange',
        "binding": 'g.m.msg.entry.new',
        "retry": false,
        "autoAck": AutoAck.POST
    ]
    void handleMessage(def body, MessageContext context) {
            ...
    }
}

When messages are pending in the entryQueue and I start the consumer application, the logs just state:

DEBUG com.budjb.rabbitmq.RabbitConsumer  - registering consumer 'EntryConsumer' on connection '24c0235d-81a2-46b8-bca7-0f10b87576a3' as a RabbitMQ subscriber

...and nothing is processed by the consumer. As soon as I send a new message on the queue, it is processed as expected, but all pending messages remain on the queue.

Any idea?

Consumer handleMessage body is empty string

Hi bud,
I use Grails 2.3.11, plugin version 3.1.0 and RabbitMQ version 3.5.1 and I follow you document at quickstart section http://budjb.github.io/grails-rabbitmq-native/doc/manual/guide/quickstart.html i can send and receive message it work well, but on handleMessage body is empty string. i try send map or other string body is still empty string

def handleMessage(def body, MessageContext context) {
println body // not print anything
return "Hello to you, too!"
}

Thank you.

Publish Expiration Use

Hi,
I am trying to use the expiration parameter on a publish with a Date object as follows:

    def now = new Date()
    def expirationDate
    use(TimeCategory) {
        expirationDate = now + 2.days
    }

    // Send the message
    rabbitMessagePublisher.send {
        exchange = RABBITMQ_DIRECT_EXCHANGE_NAME
        routingKey = SEND_QUEUE_PRIORITY_1
        expiration = expirationDate
        body = payload.toString()
    }

That results in the following exception:
com.rabbitmq.client.AlreadyClosedException: channel is already closed due to channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - invalid expiration 'Sat Apr 11 13:55:14 MDT 2015': no_integer, class-id=60, method-id=40)
at com.rabbitmq.client.impl.AMQChannel.processShutdownSignal(AMQChannel.java:270)
at com.rabbitmq.client.impl.ChannelN.startProcessShutdownSignal(ChannelN.java:261)
at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:566)
at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:505)
at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:498)
at com.rabbitmq.client.impl.recovery.AutorecoveringChannel.close(AutorecoveringChannel.java:62)
at com.budjb.rabbitmq.publisher.RabbitMessagePublisherImpl.send(RabbitMessagePublisherImpl.groovy:82)
at com.budjb.rabbitmq.publisher.RabbitMessagePublisherImpl.send(RabbitMessagePublisherImpl.groovy:93)

The example in the documentation shows only a date without a time. Does the plugin support a date and time? How do I convert a Date object to use with the expiration parameter?
Thanks

Redeliver

Hi Bud,

I'm using your plugin and it's great.. much better that the previous one!
As the previous one though it's not supporting to redeliver of the message X number of times, and it's ok since it's something missing from AMQP protocol.

But i need that feature, and as this answer suggested:
http://stackoverflow.com/a/23161921/3074089

I've created a couple of methods to handle the redelivery a fixed number of time with and exponentially growing waiting time.

It would be great if you could take a look at them and the example grails project I created:

https://github.com/tamershahin/grails-rabbitmq-retry/blob/master/src/groovy/org/gametube/retry/RetryHandler.groovy

I think that running the integration test provided should be enough to understand all logic, let me know if you need any more explanation about that.

The real question is:
I would like to see this feature in the plugin itself, and I'm happy to create that code (I see this feature coded in ConsumerAdapter) and make a pull request. What do you think?
I know that it's not in the protocol specification, so maybe you'll not be inclined to insert it in the plugin.
But it's something very useful, in fact it's the second time i have to introduce this feature in the project i'm working on using RabbitMQ and I would like to avoid customisations or to extend your plugin only for this..

Let me know your thoughts and thanks for all your work.

Tamer

documentation for

new RabbitMessageBuilder().send {
queue = "some.queue"
body = "hi!"
}

gets No such property: queue for class..

Unhandled Connection Configuration Case

In the ConnectionManager, it appears that the possibility of duplicate connection names is not accounted for:

rabbitmq {
    connections = {
        connection name: "conn1", host: "rabbit1.example.com", username: "foo", password: "bar"
        connection name: "conn1", host: "rabbit1.example.com", username: "foo", password: "bar"
        connection name: "conn3", host: "rabbit1.example.com", username: "foo", password: "bar"
    }
}

Getting below exception when connecting to RabbitMQ deployed in Unix environment

I did a POC using the native plugin you provided and is working fine as expected. I am able to connect to rabbitmq server running at http://localhost:15672/. Now I am moving the publisher/consumer code to weblogic server which is connecting to a dev rabbitmq instance at http://10.177.215.52:15672/. When I deploy the application, I am getting the below error. But I can connect to http://10.177.215.52:15672/ from browser and can verify the configuration. I verified and firewall is opened between weblogic server and rabbitmq server. Also I passed port explicitly in connection configuration, still facing same issue. Please let me know what am I missing.

2015-07-07 13:04:22,034 [[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR context.GrailsContextLoader {} - Error initializing the application: com.budjb.rabbitmq.exception.MissingConfigurationException: unable to start application because the RabbitMQ connection configuration was not found
org.codehaus.groovy.runtime.InvokerInvocationException: com.budjb.rabbitmq.exception.MissingConfigurationException: unable to start application because the RabbitMQ connection configuration was not found
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1871)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3173)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1527)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:671)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:44)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:573)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:149)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:327)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

Thanks,
Binoy

Plugin doesn't allow individual consumer to be shutdown or restarted

Applications will often have multiple consumers in order to separate responsibilities. Each consumer may connect to the same RMQ broker. At present, it is not possible to start/stop individual consumers, instead the whole RMQ context is shutdown and needs to be restarted when RMQ should be turned back on.

Here is existing code that accomplishes this:

class RmqControllerService {

    boolean shouldRmqBeRunning = false
    def rabbitContext

    /**
     * Starts all RMQ consumers
     * @return
     */
    def startRmqConsumers() {
        shouldRmqBeRunning = true
        rabbitContext = rabbitContext ?: Holders.findApplicationContext()?.getBean('rabbitContext')
        def grailsApp = Holders.getGrailsApplication()
        def rmqPlugin = Holders.getPluginManager().getGrailsPlugin('rabbitmqNative').getInstance()

        rmqPlugin.restartRabbitContext(grailsApp, rabbitContext)
        rabbitContext.startConsumers()
    }


    /**
     * Stops all RMQ consumers
     * @return
     */
    def stopRmqConsumers() {
        shouldRmqBeRunning = false
        rabbitContext = rabbitContext ?: Holders.findApplicationContext()?.getBean('rabbitContext')
        rabbitContext.stopConsumers()
    }

    /**
     * Return desired status value of RMQ system 
     * @return True if RMQ should be running, otherwise false
     */
    boolean shouldRmqBeRunning() {
        return shouldRmqBeRunning
    }
}

Presently, the only way to have multiple consumers within an application and to stop one from consuming is to have a shouldProcessMessage variable within the consumer that will repeatedly Nack a received message until the variable is set.

RabbitMQ Native Plugin using?

I'm having problems in the exchange of messages between two applications using RabbitMQ Native Plugin, messages are exchanged but when I try to view the message body is null in view, to the following documentation but TA does not help: link: http: // budjb .github.io / grails-RabbitMQ-native / doc / manual / guide / quickstart.html
below the codes:
application produces messages.

package com.example

import com.budjb.rabbitmq.RabbitMessageBuilder

class ProdutorController {

def index() {

    render new RabbitMessageBuilder().send {
        routingKey = "atendimento_ti"
        timeout = 0
        body = "Produziu-1"
    }
}

}

consumer messaging application:
import com.budjb.rabbitmq.MessageContext

class ConsumidorConsumer {
/**
* Consumer configuration.
*/
static rabbitConfig = [
queue: "atendimento_ti"
]

/**
 * Handle an incoming RabbitMQ message.
 *
 * @param body    The converted body of the incoming message.
 * @param context Properties of the incoming message.
 * @return
 */
def handleMessage(def body, MessageContext context) {
    println body
    return body
}

}

import com.budjb.rabbitmq.RabbitMessageBuilder

class ConsumidorController {

def index() {
    render new RabbitMessageBuilder().getBody();
}

}

NoClassDefFoundError: groovyx/gpars/util/PoolFactory after upgrading from version 2.0.10 to 3.1.2

Hi,

Great plugin, I have been using an older version in almost all my projects. However now I would like to use the ability to start and stop consumers, so I am upgrading.

I am running my unit test on a clean build container on shippable, so there is no issue of old classes hanging around.

When I run my unit tests, I get the following stack trace:

|  java.lang.NoClassDefFoundError: groovyx/gpars/util/PoolFactory
        at grails.async.Promises.<clinit>(Promises.java:40)
        at grails.test.runtime.GrailsApplicationTestPlugin.initialState(GrailsApplicationTestPlugin.groovy:178)
        at grails.test.runtime.GrailsApplicationTestPlugin.onTestEvent(GrailsApplicationTestPlugin.groovy:326)
        at grails.test.runtime.TestRuntime.deliverEvent(TestRuntime.groovy:295)
        at grails.test.runtime.TestRuntime.executeEventLoop(TestRuntime.groovy:280)
        at grails.test.runtime.TestRuntime.processEvents(TestRuntime.groovy:265)
        at grails.test.runtime.TestRuntime.doPublishEvent(TestRuntime.groovy:238)
        at grails.test.runtime.TestRuntime.publishEvent(TestRuntime.groovy:211)
        at grails.test.runtime.TestRuntime.getValue(TestRuntime.groovy:122)
        at grails.test.runtime.GrailsApplicationTestPlugin.onTestEvent(GrailsApplicationTestPlugin.groovy:320)
        at grails.test.runtime.TestRuntime.deliverEvent(TestRuntime.groovy:295)
        at grails.test.runtime.TestRuntime.processEvents(TestRuntime.groovy:264)
        at grails.test.runtime.TestRuntime.doPublishEvent(TestRuntime.groovy:248)
        at grails.test.runtime.TestRuntime.publishEvent(TestRuntime.groovy:211)
        at grails.test.runtime.TestRuntimeJunitAdapter.before(TestRuntimeJunitAdapter.groovy:109)
        at grails.test.runtime.TestRuntimeJunitAdapter$1$2.evaluate(TestRuntimeJunitAdapter.groovy:47)
        at org.spockframework.runtime.extension.builtin.TestRuleInterceptor.intercept(TestRuleInterceptor.java:38)
        at org.spockframework.runtime.extension.MethodInvocation.proceed(MethodInvocation.java:87)
        at org.spockframework.runtime.extension.MethodInvocation.proceed(MethodInvocation.java:88)
        at org.spockframework.runtime.extension.builtin.AbstractRuleInterceptor$1.evaluate(AbstractRuleInterceptor.java:37)
        at grails.test.runtime.TestRuntimeJunitAdapter$3$4.evaluate(TestRuntimeJunitAdapter.groovy:76)
        at org.spockframework.runtime.extension.builtin.ClassRuleInterceptor.intercept(ClassRuleInterceptor.java:38)
        at org.spockframework.runtime.extension.MethodInvocation.proceed(MethodInvocation.java:87)
Caused by: java.lang.ClassNotFoundException: groovyx.gpars.util.PoolFactory
        at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:179)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:151)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        ... 23 more
|

I see that you include the (very old, and seemingly unsupported) gpars plugin in your dependencies. Could this be related, and Is this still needed? Grails seems to be shipping with their own gpars implementation.

RabbitMQ Dynamic Connection

Is there a way to connect to a RabbitMQ server, without adding host/credentials in the config file.

I would like to add those configuration to database and later connect them after a specific activity.
The entire config initialisation should be happening by picking values from DB.

ConsumerManagerImpl throws checked exception undeclared on interface

ConsumerManagerImpl.createContext() throws MissingConfigurationException not declared on the ConsumerManager interface. Not sure if MissingConfigurationException should extend RuntimeException, the interface should declare it, or if the throws clause is just obsolete, but it's scaring our IDEs, and therefore some of our developers. (version 3.1.0)

Can I define queues in plugins

We have a project which use this great plugin.

I have a problem. We have create a log of small plugins which provide optional functions and some of them use Rabbit MQ. I want to define connections in project level and queues in plugin level.

But after I read the documents, I found I can only define queues in project config.groovy and the plugin can't define their own queues. Is this true?

Tomcat redeploying issues

I am running a Grails application (grails-2.0.4) with the RabbitMQ native plugin and deploying on Tomcat 7.

On first time deployment or after restarting tomcat all works well, but as soon as I re-deploy my app without restarting tomcat, I get the following errors: Seems like my channels aren't being closed on undeployment.

Mar 03, 2015 12:56:33 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load com.rabbitmq.client.impl.ContentHeaderPropertyReader. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1600)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at com.rabbitmq.client.AMQP$BasicProperties.(AMQP.java:1660)
at com.rabbitmq.client.impl.AMQImpl.readContentHeaderFrom(AMQImpl.java:3511)
at com.rabbitmq.client.impl.CommandAssembler.consumeHeaderFrame(CommandAssembler.java:102)
at com.rabbitmq.client.impl.CommandAssembler.handleFrame(CommandAssembler.java:159)
at com.rabbitmq.client.impl.AMQCommand.handleFrame(AMQCommand.java:87)
at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:89)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:552)
at java.lang.Thread.run(Thread.java:745)

Mar 03, 2015 12:56:33 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load com.rabbitmq.client.impl.ChannelManager$1. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1600)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at com.rabbitmq.client.impl.ChannelManager.scheduleShutdownProcessing(ChannelManager.java:106)
at com.rabbitmq.client.impl.ChannelManager.handleSignal(ChannelManager.java:100)
at com.rabbitmq.client.impl.AMQConnection.finishShutdown(AMQConnection.java:735)
at com.rabbitmq.client.impl.AMQConnection.shutdown(AMQConnection.java:708)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:569)
at java.lang.Thread.run(Thread.java:745)

Mar 03, 2015 12:56:33 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load org.codehaus.groovy.runtime.ArrayUtil. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1600)
at java.lang.ClassLoader.loadClass(ClassLoader.java:412)
at org.codehaus.groovy.runtime.callsite.CallSiteClassLoader.loadClass(CallSiteClassLoader.java:48)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.loadClass(ClassLoaderForClassArtifacts.java:58)
at com.budjb.rabbitmq.converter.MapMessageConverter$canConvertTo.call(Unknown Source)
at com.budjb.rabbitmq.converter.MessageConverterManager.convertFromBytes(MessageConverterManager.groovy:73)
at com.budjb.rabbitmq.converter.MessageConverterManager$convertFromBytes.call(Unknown Source)
at com.budjb.rabbitmq.consumer.ConsumerAdapter.convertMessage(ConsumerAdapter.groovy:579)
at com.budjb.rabbitmq.consumer.ConsumerAdapter.this$2$convertMessage(ConsumerAdapter.groovy)
at com.budjb.rabbitmq.consumer.ConsumerAdapter$this$2$convertMessage.callCurrent(Unknown Source)
at com.budjb.rabbitmq.consumer.ConsumerAdapter.processMessage(ConsumerAdapter.groovy:448)
at com.budjb.rabbitmq.consumer.ConsumerAdapter.this$2$processMessage(ConsumerAdapter.groovy)
at com.budjb.rabbitmq.consumer.ConsumerAdapter$this$2$processMessage.callCurrent(Unknown Source)
at com.budjb.rabbitmq.consumer.ConsumerAdapter.deliverMessage(ConsumerAdapter.groovy:417)
at com.budjb.rabbitmq.consumer.ConsumerAdapter.this$2$deliverMessage(ConsumerAdapter.groovy)
at com.budjb.rabbitmq.consumer.ConsumerAdapter$this$2$deliverMessage.call(Unknown Source)
at com.budjb.rabbitmq.consumer.ConsumerAdapter$RabbitConsumer.handleDelivery(ConsumerAdapter.groovy:88)
at com.rabbitmq.client.impl.ConsumerDispatcher$5.run(ConsumerDispatcher.java:144)
at com.rabbitmq.client.impl.ConsumerWorkService$WorkPoolRunnable.run(ConsumerWorkService.java:95)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

Mar 03, 2015 12:56:33 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load org.codehaus.groovy.runtime.callsite.CallSiteArray. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1600)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at org.codehaus.groovy.runtime.callsite.CallSiteClassLoader.loadClass(CallSiteClassLoader.java:45)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.loadClass(ClassLoaderForClassArtifacts.java:58)
at com.budjb.rabbitmq.converter.MapMessageConverter$canConvertTo.call(Unknown Source)
at com.budjb.rabbitmq.converter.MessageConverterManager.convertFromBytes(MessageConverterManager.groovy:73)
at com.budjb.rabbitmq.converter.MessageConverterManager$convertFromBytes.call(Unknown Source)
at com.budjb.rabbitmq.consumer.ConsumerAdapter.convertMessage(ConsumerAdapter.groovy:579)
at com.budjb.rabbitmq.consumer.ConsumerAdapter.this$2$convertMessage(ConsumerAdapter.groovy)
at com.budjb.rabbitmq.consumer.ConsumerAdapter$this$2$convertMessage.callCurrent(Unknown Source)
at com.budjb.rabbitmq.consumer.ConsumerAdapter.processMessage(ConsumerAdapter.groovy:448)
at com.budjb.rabbitmq.consumer.ConsumerAdapter.this$2$processMessage(ConsumerAdapter.groovy)
at com.budjb.rabbitmq.consumer.ConsumerAdapter$this$2$processMessage.callCurrent(Unknown Source)
at com.budjb.rabbitmq.consumer.ConsumerAdapter.deliverMessage(ConsumerAdapter.groovy:417)
at com.budjb.rabbitmq.consumer.ConsumerAdapter.this$2$deliverMessage(ConsumerAdapter.groovy)
at com.budjb.rabbitmq.consumer.ConsumerAdapter$this$2$deliverMessage.call(Unknown Source)
at com.budjb.rabbitmq.consumer.ConsumerAdapter$RabbitConsumer.handleDelivery(ConsumerAdapter.groovy:88)
at com.rabbitmq.client.impl.ConsumerDispatcher$5.run(ConsumerDispatcher.java:144)
at com.rabbitmq.client.impl.ConsumerWorkService$WorkPoolRunnable.run(ConsumerWorkService.java:95)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

Caught an exception when recovering topology Caught an exception while recovering queue activity.event: channel is already closed due to clean channel shutdown; protocol method: #method<channel.close>(reply-code=200, reply-text=OK, class-id=0, method-id=0)
com.rabbitmq.client.TopologyRecoveryException: Caught an exception while recovering queue activity.event: channel is already closed due to clean channel shutdown; protocol method: #method<channel.close>(reply-code=200, reply-text=OK, class-id=0, method-id=0)
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.recoverQueues(AutorecoveringConnection.java:510)
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.recoverEntities(AutorecoveringConnection.java:468)
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.beginAutomaticRecovery(AutorecoveringConnection.java:411)
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.access$000(AutorecoveringConnection.java:52)
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection$1.shutdownCompleted(AutorecoveringConnection.java:351)
at com.rabbitmq.client.impl.ShutdownNotifierComponent.notifyListeners(ShutdownNotifierComponent.java:75)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:574)
at java.lang.Thread.run(Thread.java:745)

Where am I going wrong?
Sophia

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.