You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Ben Stover <bx...@yahoo.co.uk> on 2010/09/01 15:50:29 UTC

SpringXML intercption of consumer connects and consumer msg retrievals possible?

As you know Spring offers a mechanism called Interceptors which triggers a user bean whenever a certain interface call is issued internally

Spring configuration go similar to:

<bean id="idMyPointcut"   class="org.springframework.aop.support.JdkRegexpMethodPointcut">
    <property name="pattern" value=".*aop.myBe.*" />
  </bean>

<bean id="idMyAdvice" class="sampleaop.MyMethodInterceptor" />

  <bean class="org.springframework.aop.support.DefaultPointcutAdvisor">
    <property name="advice"   ref="idMyAdvice" />
    <property name="pointcut" ref="idMyPointcut" />
  </bean>

Is something similar within ActiveMQ?

I am particularly interested in intercepting call when consumers retrieve msgs from a queue.

Ben












Re: SpringXML intercption of consumer connects and consumer msg retrievals possible?

Posted by Gary Tully <ga...@gmail.com>.
ActiveMQ does not have any high level support for AOP, it really would
just duplicate what is elsewhere, but there is no reason why a message
listener bean cannot be annotated with @Aspect and integrate with
spring AOP or why any of the activemq code could not be  intercepted
with AspectJ.

On the broker side, you may be interested in broker plugins that can
give you interceptors on all broker operations, including message
dispatch to consumers. see:
http://activemq.apache.org/interceptors.html


On 1 September 2010 14:50, Ben Stover <bx...@yahoo.co.uk> wrote:
> As you know Spring offers a mechanism called Interceptors which triggers a user bean whenever a certain interface call is issued internally
>
> Spring configuration go similar to:
>
> <bean id="idMyPointcut"   class="org.springframework.aop.support.JdkRegexpMethodPointcut">
>    <property name="pattern" value=".*aop.myBe.*" />
>  </bean>
>
> <bean id="idMyAdvice" class="sampleaop.MyMethodInterceptor" />
>
>  <bean class="org.springframework.aop.support.DefaultPointcutAdvisor">
>    <property name="advice"   ref="idMyAdvice" />
>    <property name="pointcut" ref="idMyPointcut" />
>  </bean>
>
> Is something similar within ActiveMQ?
>
> I am particularly interested in intercepting call when consumers retrieve msgs from a queue.
>
> Ben
>
>
>
>
>
>
>
>
>
>
>
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com