You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Filip Hanik - Dev Lists <de...@hanik.com> on 2008/05/10 01:45:15 UTC

create policyentry for temp topics

is there a way to create a
<policyEntry> for temporary topics?

Filip

Re: create policyentry for temp topics

Posted by Badri <ba...@fxall.com>.
1) Can you give more details & elaborate on the brokerfilter, configuration
of policy entries?

2) Were any filters set such that the messages will get dropped only when
they don't cater to some condition? An example is --> if message is of type
Price, drop. If message is of type Trade, don't drop.
Are there any filteredDestinations?

3) Does the plugin monitor based on topic name + destination? I have a case
where topic PRICES.A1 for a consumer d1 needs to be monitored? Is it
possible to set some rules such that messages are dropped for a particular
topic + destination?

Thanks for your time & reply.




Filip Hanik - Dev Lists wrote:
> 
> that's absolutely doable, what you'd need to do is set
> 
> producerFlowControl="false" on your policy entries,
> that's what we did.
> 
> then we setup the pendingMessageLimitStrategy to 1000, and our problem 
> was that when a message was discarded it went to the DLQ and eventually 
> caused OOME.
> 
> The BrokerFilter class (Broker interface) can let you do many different 
> things
> 
> let me know if you wish to elaborate some more
> 
> Filip
> 
> Badri wrote:
>> Thanks Filip for taking time & replying.
>>
>> My use case is I have 5 components in my application which are consumers
>> to
>> active mq & receive data through temporary topics. If 1 of the consumer
>> becomes slow, it blocks the publisher. I was thinking of configuring in
>> activemq.xml based on topic / destinations. I was planning to use
>> "pendingMessageLimitStrategy -   prefetchRatePendingMessageLimitStrategy
>> &
>> also eviction strategies". By doing this I am hoping that other fast
>> consumers receive data. Do you think plugin filters could also make a
>> difference since this is a data sensitive application?
>>
>> Thanks
>> Badri
>>
>>
>>
>> Filip Hanik - Dev Lists wrote:
>>   
>>> Sure Badri,
>>> our use case that we were dropping messages on the broker, so they go to 
>>> the Dead Letter Queue (DLQ),
>>> however, for temporary topics, we didn't want that to happen, and since 
>>> I wasn't able to configure a policy for temp topics where we could plug 
>>> in a discarding DLQ, then we just did it as a plugin.
>>>
>>> The configuration looks like
>>>
>>>     <plugins>
>>>       <bean
>>>         xmlns="http://www.springframework.org/schema/beans"
>>>         id="covalentDlqBroker"
>>>         class="com.covalent.activemq.discard.CovalentDLQBrokerPlugin">
>>>         <property name="dropAll" value="false"/>
>>>         <property name="dropTemporaryTopics" value="true"/>
>>>         <property name="dropTemporaryQueues" value="true"/>
>>>         <!--drops by destination name, using java regular expressions
>>>             
>>> http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html
>>>             delimited by spaces, so destination names cannot contain 
>>> spaces   
>>>         -->
>>>         <property name="dropOnly" value="some_alarm another_alarm"/>
>>>         <!--how frequently do we output how many messages we have 
>>> dropped - use 0 for disable-->
>>>         <property name="reportInterval" value="1000"/>
>>>       </bean> 
>>>     </plugins>  
>>>
>>> The library and source code can be found here
>>> http://people.apache.org/~fhanik/covalent-dlq.jar
>>>
>>> the nice thing with a broker plugin, is that you actually can control a 
>>> lot more than just DLQ :)
>>>
>>> hope this helps
>>> Filip
>>>
>>> Badri wrote:
>>>     
>>>> Hi Filip
>>>>
>>>> Can you give more details about the broker plugin filter?
>>>> I also need to create policy entry for temporary topics.
>>>>
>>>> Thanks for your help & time.
>>>> Badri
>>>>
>>>>
>>>> Filip Hanik - Dev Lists wrote:
>>>>   
>>>>       
>>>>> I couldn't get that to work properly, I even tried topic="ID>" since 
>>>>> that was the prefix, and didn't work either.
>>>>> I worked around the problem by creating a broker plugin filter, and 
>>>>> doing my operations in there
>>>>>
>>>>> Filip
>>>>>
>>>>> Hiram Chirino wrote:
>>>>>     
>>>>>         
>>>>>> I guess you want an entry for all topics or all queues right (since
>>>>>> the actually names are dynamic)?
>>>>>>
>>>>>> One way to do it might be to use topic='>' since that would match all
>>>>>> topics (temp topics are still topics).  But I guess we should have
>>>>>> something a little bette than that.
>>>>>>
>>>>>> On Fri, May 9, 2008 at 7:45 PM, Filip Hanik - Dev Lists
>>>>>> <de...@hanik.com> wrote:
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>>> is there a way to create a
>>>>>>> <policyEntry> for temporary topics?
>>>>>>>
>>>>>>> Filip
>>>>>>>
>>>>>>>     
>>>>>>>         
>>>>>>>             
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>     
>>>>>         
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/create-policyentry-for-temp-topics-tp17158262p18095579.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: create policyentry for temp topics

Posted by Badri <ba...@fxall.com>.
Hi Filip

I am using topics & no queues.
Is there a way to drop messages for particular consumers / for particular
temporary topics based on certain conditions?

For example, if the message type is of type A or B, don't discard. If
message is of type C, discard. 

Can BrokerFilter be used for discarding mesages based on conditions for slow
consumers?

Can policy entry be configured in following way?

                    <policyEntry
topic="ActiveMQ.Advisory.Consumer.Topic.PRICES.XYZ"
producerFlowControl="false" memoryLimit="5mb">
                        <destination><topic
name="ID:dcmpdevapp02"/></destination>
                        <subscriptionRecoveryPolicy>
                            <queryBasedSubscriptionRecoveryPolicy
query="MType = 'A' OR MType = 'B'" />
                        </subscriptionRecoveryPolicy>
                        <pendingMessageLimitStrategy>
                            <prefetchRatePendingMessageLimitStrategy
multiplier="2"/>
                        </pendingMessageLimitStrategy>
                    </policyEntry>

Will configuring the xml be a good substitute than a plugin filter? Or
broker filter will do the same operation effortlessly & it is more flexible
than xml configuration?

Thanks.



Filip Hanik - Dev Lists wrote:
> 
> that's absolutely doable, what you'd need to do is set
> 
> producerFlowControl="false" on your policy entries,
> that's what we did.
> 
> then we setup the pendingMessageLimitStrategy to 1000, and our problem 
> was that when a message was discarded it went to the DLQ and eventually 
> caused OOME.
> 
> The BrokerFilter class (Broker interface) can let you do many different 
> things
> 
> let me know if you wish to elaborate some more
> 
> Filip
> 
> Badri wrote:
>> Thanks Filip for taking time & replying.
>>
>> My use case is I have 5 components in my application which are consumers
>> to
>> active mq & receive data through temporary topics. If 1 of the consumer
>> becomes slow, it blocks the publisher. I was thinking of configuring in
>> activemq.xml based on topic / destinations. I was planning to use
>> "pendingMessageLimitStrategy -   prefetchRatePendingMessageLimitStrategy
>> &
>> also eviction strategies". By doing this I am hoping that other fast
>> consumers receive data. Do you think plugin filters could also make a
>> difference since this is a data sensitive application?
>>
>> Thanks
>> Badri
>>
>>
>>
>> Filip Hanik - Dev Lists wrote:
>>   
>>> Sure Badri,
>>> our use case that we were dropping messages on the broker, so they go to 
>>> the Dead Letter Queue (DLQ),
>>> however, for temporary topics, we didn't want that to happen, and since 
>>> I wasn't able to configure a policy for temp topics where we could plug 
>>> in a discarding DLQ, then we just did it as a plugin.
>>>
>>> The configuration looks like
>>>
>>>     <plugins>
>>>       <bean
>>>         xmlns="http://www.springframework.org/schema/beans"
>>>         id="covalentDlqBroker"
>>>         class="com.covalent.activemq.discard.CovalentDLQBrokerPlugin">
>>>         <property name="dropAll" value="false"/>
>>>         <property name="dropTemporaryTopics" value="true"/>
>>>         <property name="dropTemporaryQueues" value="true"/>
>>>         <!--drops by destination name, using java regular expressions
>>>             
>>> http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html
>>>             delimited by spaces, so destination names cannot contain 
>>> spaces   
>>>         -->
>>>         <property name="dropOnly" value="some_alarm another_alarm"/>
>>>         <!--how frequently do we output how many messages we have 
>>> dropped - use 0 for disable-->
>>>         <property name="reportInterval" value="1000"/>
>>>       </bean> 
>>>     </plugins>  
>>>
>>> The library and source code can be found here
>>> http://people.apache.org/~fhanik/covalent-dlq.jar
>>>
>>> the nice thing with a broker plugin, is that you actually can control a 
>>> lot more than just DLQ :)
>>>
>>> hope this helps
>>> Filip
>>>
>>> Badri wrote:
>>>     
>>>> Hi Filip
>>>>
>>>> Can you give more details about the broker plugin filter?
>>>> I also need to create policy entry for temporary topics.
>>>>
>>>> Thanks for your help & time.
>>>> Badri
>>>>
>>>>
>>>> Filip Hanik - Dev Lists wrote:
>>>>   
>>>>       
>>>>> I couldn't get that to work properly, I even tried topic="ID>" since 
>>>>> that was the prefix, and didn't work either.
>>>>> I worked around the problem by creating a broker plugin filter, and 
>>>>> doing my operations in there
>>>>>
>>>>> Filip
>>>>>
>>>>> Hiram Chirino wrote:
>>>>>     
>>>>>         
>>>>>> I guess you want an entry for all topics or all queues right (since
>>>>>> the actually names are dynamic)?
>>>>>>
>>>>>> One way to do it might be to use topic='>' since that would match all
>>>>>> topics (temp topics are still topics).  But I guess we should have
>>>>>> something a little bette than that.
>>>>>>
>>>>>> On Fri, May 9, 2008 at 7:45 PM, Filip Hanik - Dev Lists
>>>>>> <de...@hanik.com> wrote:
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>>> is there a way to create a
>>>>>>> <policyEntry> for temporary topics?
>>>>>>>
>>>>>>> Filip
>>>>>>>
>>>>>>>     
>>>>>>>         
>>>>>>>             
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>     
>>>>>         
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/create-policyentry-for-temp-topics-tp17158262p17943349.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: create policyentry for temp topics

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
that's absolutely doable, what you'd need to do is set

producerFlowControl="false" on your policy entries,
that's what we did.

then we setup the pendingMessageLimitStrategy to 1000, and our problem 
was that when a message was discarded it went to the DLQ and eventually 
caused OOME.

The BrokerFilter class (Broker interface) can let you do many different 
things

let me know if you wish to elaborate some more

Filip

Badri wrote:
> Thanks Filip for taking time & replying.
>
> My use case is I have 5 components in my application which are consumers to
> active mq & receive data through temporary topics. If 1 of the consumer
> becomes slow, it blocks the publisher. I was thinking of configuring in
> activemq.xml based on topic / destinations. I was planning to use
> "pendingMessageLimitStrategy -   prefetchRatePendingMessageLimitStrategy &
> also eviction strategies". By doing this I am hoping that other fast
> consumers receive data. Do you think plugin filters could also make a
> difference since this is a data sensitive application?
>
> Thanks
> Badri
>
>
>
> Filip Hanik - Dev Lists wrote:
>   
>> Sure Badri,
>> our use case that we were dropping messages on the broker, so they go to 
>> the Dead Letter Queue (DLQ),
>> however, for temporary topics, we didn't want that to happen, and since 
>> I wasn't able to configure a policy for temp topics where we could plug 
>> in a discarding DLQ, then we just did it as a plugin.
>>
>> The configuration looks like
>>
>>     <plugins>
>>       <bean
>>         xmlns="http://www.springframework.org/schema/beans"
>>         id="covalentDlqBroker"
>>         class="com.covalent.activemq.discard.CovalentDLQBrokerPlugin">
>>         <property name="dropAll" value="false"/>
>>         <property name="dropTemporaryTopics" value="true"/>
>>         <property name="dropTemporaryQueues" value="true"/>
>>         <!--drops by destination name, using java regular expressions
>>             
>> http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html
>>             delimited by spaces, so destination names cannot contain 
>> spaces   
>>         -->
>>         <property name="dropOnly" value="some_alarm another_alarm"/>
>>         <!--how frequently do we output how many messages we have 
>> dropped - use 0 for disable-->
>>         <property name="reportInterval" value="1000"/>
>>       </bean> 
>>     </plugins>  
>>
>> The library and source code can be found here
>> http://people.apache.org/~fhanik/covalent-dlq.jar
>>
>> the nice thing with a broker plugin, is that you actually can control a 
>> lot more than just DLQ :)
>>
>> hope this helps
>> Filip
>>
>> Badri wrote:
>>     
>>> Hi Filip
>>>
>>> Can you give more details about the broker plugin filter?
>>> I also need to create policy entry for temporary topics.
>>>
>>> Thanks for your help & time.
>>> Badri
>>>
>>>
>>> Filip Hanik - Dev Lists wrote:
>>>   
>>>       
>>>> I couldn't get that to work properly, I even tried topic="ID>" since 
>>>> that was the prefix, and didn't work either.
>>>> I worked around the problem by creating a broker plugin filter, and 
>>>> doing my operations in there
>>>>
>>>> Filip
>>>>
>>>> Hiram Chirino wrote:
>>>>     
>>>>         
>>>>> I guess you want an entry for all topics or all queues right (since
>>>>> the actually names are dynamic)?
>>>>>
>>>>> One way to do it might be to use topic='>' since that would match all
>>>>> topics (temp topics are still topics).  But I guess we should have
>>>>> something a little bette than that.
>>>>>
>>>>> On Fri, May 9, 2008 at 7:45 PM, Filip Hanik - Dev Lists
>>>>> <de...@hanik.com> wrote:
>>>>>   
>>>>>       
>>>>>           
>>>>>> is there a way to create a
>>>>>> <policyEntry> for temporary topics?
>>>>>>
>>>>>> Filip
>>>>>>
>>>>>>     
>>>>>>         
>>>>>>             
>>>>>   
>>>>>       
>>>>>           
>>>>     
>>>>         
>>>   
>>>       
>>
>>     
>
>   


Re: create policyentry for temp topics

Posted by Badri <ba...@fxall.com>.
Thanks Filip for taking time & replying.

My use case is I have 5 components in my application which are consumers to
active mq & receive data through temporary topics. If 1 of the consumer
becomes slow, it blocks the publisher. I was thinking of configuring in
activemq.xml based on topic / destinations. I was planning to use
"pendingMessageLimitStrategy -   prefetchRatePendingMessageLimitStrategy &
also eviction strategies". By doing this I am hoping that other fast
consumers receive data. Do you think plugin filters could also make a
difference since this is a data sensitive application?

Thanks
Badri



Filip Hanik - Dev Lists wrote:
> 
> Sure Badri,
> our use case that we were dropping messages on the broker, so they go to 
> the Dead Letter Queue (DLQ),
> however, for temporary topics, we didn't want that to happen, and since 
> I wasn't able to configure a policy for temp topics where we could plug 
> in a discarding DLQ, then we just did it as a plugin.
> 
> The configuration looks like
> 
>     <plugins>
>       <bean
>         xmlns="http://www.springframework.org/schema/beans"
>         id="covalentDlqBroker"
>         class="com.covalent.activemq.discard.CovalentDLQBrokerPlugin">
>         <property name="dropAll" value="false"/>
>         <property name="dropTemporaryTopics" value="true"/>
>         <property name="dropTemporaryQueues" value="true"/>
>         <!--drops by destination name, using java regular expressions
>             
> http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html
>             delimited by spaces, so destination names cannot contain 
> spaces   
>         -->
>         <property name="dropOnly" value="some_alarm another_alarm"/>
>         <!--how frequently do we output how many messages we have 
> dropped - use 0 for disable-->
>         <property name="reportInterval" value="1000"/>
>       </bean> 
>     </plugins>  
> 
> The library and source code can be found here
> http://people.apache.org/~fhanik/covalent-dlq.jar
> 
> the nice thing with a broker plugin, is that you actually can control a 
> lot more than just DLQ :)
> 
> hope this helps
> Filip
> 
> Badri wrote:
>> Hi Filip
>>
>> Can you give more details about the broker plugin filter?
>> I also need to create policy entry for temporary topics.
>>
>> Thanks for your help & time.
>> Badri
>>
>>
>> Filip Hanik - Dev Lists wrote:
>>   
>>> I couldn't get that to work properly, I even tried topic="ID>" since 
>>> that was the prefix, and didn't work either.
>>> I worked around the problem by creating a broker plugin filter, and 
>>> doing my operations in there
>>>
>>> Filip
>>>
>>> Hiram Chirino wrote:
>>>     
>>>> I guess you want an entry for all topics or all queues right (since
>>>> the actually names are dynamic)?
>>>>
>>>> One way to do it might be to use topic='>' since that would match all
>>>> topics (temp topics are still topics).  But I guess we should have
>>>> something a little bette than that.
>>>>
>>>> On Fri, May 9, 2008 at 7:45 PM, Filip Hanik - Dev Lists
>>>> <de...@hanik.com> wrote:
>>>>   
>>>>       
>>>>> is there a way to create a
>>>>> <policyEntry> for temporary topics?
>>>>>
>>>>> Filip
>>>>>
>>>>>     
>>>>>         
>>>>
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/create-policyentry-for-temp-topics-tp17158262s2354p17342325.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: create policyentry for temp topics

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
that's wasn't possible in our case, since the app was 3rd party, with no 
source code, we needed to override the "persistent" on the server

Filip

Rob Davies wrote:
> You can always ensure the messages sent on the temporary topics are 
> non-persistent - (by setting the delivery mode on the producer) - and 
> then set the DLQ strategy property processNonPersistent=false
>
>
> cheers,
>
> Rob
>
> http://open.iona.com/products/enterprise-activemq
> http://rajdavies.blogspot.com/
>
>
>
> On 20 May 2008, at 15:33, Filip Hanik - Dev Lists wrote:
>
>> Sure Badri,
>> our use case that we were dropping messages on the broker, so they go 
>> to the Dead Letter Queue (DLQ),
>> however, for temporary topics, we didn't want that to happen, and 
>> since I wasn't able to configure a policy for temp topics where we 
>> could plug in a discarding DLQ, then we just did it as a plugin.
>>
>> The configuration looks like
>>
>>   <plugins>
>>     <bean
>>       xmlns="http://www.springframework.org/schema/beans"
>>       id="covalentDlqBroker"
>>       class="com.covalent.activemq.discard.CovalentDLQBrokerPlugin">
>>       <property name="dropAll" value="false"/>
>>       <property name="dropTemporaryTopics" value="true"/>
>>       <property name="dropTemporaryQueues" value="true"/>
>>       <!--drops by destination name, using java regular expressions
>>           
>> http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html
>>           delimited by spaces, so destination names cannot contain 
>> spaces          -->
>>       <property name="dropOnly" value="some_alarm another_alarm"/>
>>       <!--how frequently do we output how many messages we have 
>> dropped - use 0 for disable-->
>>       <property name="reportInterval" value="1000"/>
>>     </bean>    </plugins>
>> The library and source code can be found here
>> http://people.apache.org/~fhanik/covalent-dlq.jar
>>
>> the nice thing with a broker plugin, is that you actually can control 
>> a lot more than just DLQ :)
>>
>> hope this helps
>> Filip
>>
>> Badri wrote:
>>> Hi Filip
>>>
>>> Can you give more details about the broker plugin filter?
>>> I also need to create policy entry for temporary topics.
>>>
>>> Thanks for your help & time.
>>> Badri
>>>
>>>
>>> Filip Hanik - Dev Lists wrote:
>>>
>>>> I couldn't get that to work properly, I even tried topic="ID>" 
>>>> since that was the prefix, and didn't work either.
>>>> I worked around the problem by creating a broker plugin filter, and 
>>>> doing my operations in there
>>>>
>>>> Filip
>>>>
>>>> Hiram Chirino wrote:
>>>>
>>>>> I guess you want an entry for all topics or all queues right (since
>>>>> the actually names are dynamic)?
>>>>>
>>>>> One way to do it might be to use topic='>' since that would match all
>>>>> topics (temp topics are still topics).  But I guess we should have
>>>>> something a little bette than that.
>>>>>
>>>>> On Fri, May 9, 2008 at 7:45 PM, Filip Hanik - Dev Lists
>>>>> <de...@hanik.com> wrote:
>>>>>
>>>>>> is there a way to create a
>>>>>> <policyEntry> for temporary topics?
>>>>>>
>>>>>> Filip
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>
>
>
>
>
>


Re: create policyentry for temp topics

Posted by Rob Davies <ra...@gmail.com>.
You can always ensure the messages sent on the temporary topics are  
non-persistent - (by setting the delivery mode on the producer) - and  
then set the DLQ strategy property processNonPersistent=false


cheers,

Rob

http://open.iona.com/products/enterprise-activemq
http://rajdavies.blogspot.com/



On 20 May 2008, at 15:33, Filip Hanik - Dev Lists wrote:

> Sure Badri,
> our use case that we were dropping messages on the broker, so they  
> go to the Dead Letter Queue (DLQ),
> however, for temporary topics, we didn't want that to happen, and  
> since I wasn't able to configure a policy for temp topics where we  
> could plug in a discarding DLQ, then we just did it as a plugin.
>
> The configuration looks like
>
>   <plugins>
>     <bean
>       xmlns="http://www.springframework.org/schema/beans"
>       id="covalentDlqBroker"
>       class="com.covalent.activemq.discard.CovalentDLQBrokerPlugin">
>       <property name="dropAll" value="false"/>
>       <property name="dropTemporaryTopics" value="true"/>
>       <property name="dropTemporaryQueues" value="true"/>
>       <!--drops by destination name, using java regular expressions
>           http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html
>           delimited by spaces, so destination names cannot contain  
> spaces          -->
>       <property name="dropOnly" value="some_alarm another_alarm"/>
>       <!--how frequently do we output how many messages we have  
> dropped - use 0 for disable-->
>       <property name="reportInterval" value="1000"/>
>     </bean>    </plugins>
> The library and source code can be found here
> http://people.apache.org/~fhanik/covalent-dlq.jar
>
> the nice thing with a broker plugin, is that you actually can  
> control a lot more than just DLQ :)
>
> hope this helps
> Filip
>
> Badri wrote:
>> Hi Filip
>>
>> Can you give more details about the broker plugin filter?
>> I also need to create policy entry for temporary topics.
>>
>> Thanks for your help & time.
>> Badri
>>
>>
>> Filip Hanik - Dev Lists wrote:
>>
>>> I couldn't get that to work properly, I even tried topic="ID>"  
>>> since that was the prefix, and didn't work either.
>>> I worked around the problem by creating a broker plugin filter,  
>>> and doing my operations in there
>>>
>>> Filip
>>>
>>> Hiram Chirino wrote:
>>>
>>>> I guess you want an entry for all topics or all queues right (since
>>>> the actually names are dynamic)?
>>>>
>>>> One way to do it might be to use topic='>' since that would match  
>>>> all
>>>> topics (temp topics are still topics).  But I guess we should have
>>>> something a little bette than that.
>>>>
>>>> On Fri, May 9, 2008 at 7:45 PM, Filip Hanik - Dev Lists
>>>> <de...@hanik.com> wrote:
>>>>
>>>>> is there a way to create a
>>>>> <policyEntry> for temporary topics?
>>>>>
>>>>> Filip
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>





Re: create policyentry for temp topics

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
Sure Badri,
our use case that we were dropping messages on the broker, so they go to 
the Dead Letter Queue (DLQ),
however, for temporary topics, we didn't want that to happen, and since 
I wasn't able to configure a policy for temp topics where we could plug 
in a discarding DLQ, then we just did it as a plugin.

The configuration looks like

    <plugins>
      <bean
        xmlns="http://www.springframework.org/schema/beans"
        id="covalentDlqBroker"
        class="com.covalent.activemq.discard.CovalentDLQBrokerPlugin">
        <property name="dropAll" value="false"/>
        <property name="dropTemporaryTopics" value="true"/>
        <property name="dropTemporaryQueues" value="true"/>
        <!--drops by destination name, using java regular expressions
            
http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html
            delimited by spaces, so destination names cannot contain 
spaces   
        -->
        <property name="dropOnly" value="some_alarm another_alarm"/>
        <!--how frequently do we output how many messages we have 
dropped - use 0 for disable-->
        <property name="reportInterval" value="1000"/>
      </bean> 
    </plugins>  

The library and source code can be found here
http://people.apache.org/~fhanik/covalent-dlq.jar

the nice thing with a broker plugin, is that you actually can control a 
lot more than just DLQ :)

hope this helps
Filip

Badri wrote:
> Hi Filip
>
> Can you give more details about the broker plugin filter?
> I also need to create policy entry for temporary topics.
>
> Thanks for your help & time.
> Badri
>
>
> Filip Hanik - Dev Lists wrote:
>   
>> I couldn't get that to work properly, I even tried topic="ID>" since 
>> that was the prefix, and didn't work either.
>> I worked around the problem by creating a broker plugin filter, and 
>> doing my operations in there
>>
>> Filip
>>
>> Hiram Chirino wrote:
>>     
>>> I guess you want an entry for all topics or all queues right (since
>>> the actually names are dynamic)?
>>>
>>> One way to do it might be to use topic='>' since that would match all
>>> topics (temp topics are still topics).  But I guess we should have
>>> something a little bette than that.
>>>
>>> On Fri, May 9, 2008 at 7:45 PM, Filip Hanik - Dev Lists
>>> <de...@hanik.com> wrote:
>>>   
>>>       
>>>> is there a way to create a
>>>> <policyEntry> for temporary topics?
>>>>
>>>> Filip
>>>>
>>>>     
>>>>         
>>>
>>>   
>>>       
>>
>>     
>
>   


Re: create policyentry for temp topics

Posted by Badri <ba...@fxall.com>.
Hi Filip

Can you give more details about the broker plugin filter?
I also need to create policy entry for temporary topics.

Thanks for your help & time.
Badri


Filip Hanik - Dev Lists wrote:
> 
> I couldn't get that to work properly, I even tried topic="ID>" since 
> that was the prefix, and didn't work either.
> I worked around the problem by creating a broker plugin filter, and 
> doing my operations in there
> 
> Filip
> 
> Hiram Chirino wrote:
>> I guess you want an entry for all topics or all queues right (since
>> the actually names are dynamic)?
>>
>> One way to do it might be to use topic='>' since that would match all
>> topics (temp topics are still topics).  But I guess we should have
>> something a little bette than that.
>>
>> On Fri, May 9, 2008 at 7:45 PM, Filip Hanik - Dev Lists
>> <de...@hanik.com> wrote:
>>   
>>> is there a way to create a
>>> <policyEntry> for temporary topics?
>>>
>>> Filip
>>>
>>>     
>>
>>
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/create-policyentry-for-temp-topics-tp17158262s2354p17329027.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: create policyentry for temp topics

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
I couldn't get that to work properly, I even tried topic="ID>" since 
that was the prefix, and didn't work either.
I worked around the problem by creating a broker plugin filter, and 
doing my operations in there

Filip

Hiram Chirino wrote:
> I guess you want an entry for all topics or all queues right (since
> the actually names are dynamic)?
>
> One way to do it might be to use topic='>' since that would match all
> topics (temp topics are still topics).  But I guess we should have
> something a little bette than that.
>
> On Fri, May 9, 2008 at 7:45 PM, Filip Hanik - Dev Lists
> <de...@hanik.com> wrote:
>   
>> is there a way to create a
>> <policyEntry> for temporary topics?
>>
>> Filip
>>
>>     
>
>
>
>   


Re: create policyentry for temp topics

Posted by Hiram Chirino <hi...@hiramchirino.com>.
I guess you want an entry for all topics or all queues right (since
the actually names are dynamic)?

One way to do it might be to use topic='>' since that would match all
topics (temp topics are still topics).  But I guess we should have
something a little bette than that.

On Fri, May 9, 2008 at 7:45 PM, Filip Hanik - Dev Lists
<de...@hanik.com> wrote:
> is there a way to create a
> <policyEntry> for temporary topics?
>
> Filip
>



-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Open Source SOA
http://open.iona.com