[Design of Messaging on JBoss (Messaging/JBoss)] - Full JMX functionality
by timfox
I have fleshed out the ServerPeer, Queue and Topic MBean interfaces so now we have complete equivalent JMX functionality to JBossMQ.
I also sorted out the mess that was the Queue/Topic mbean interface
There's basically a whole stack of new stuff in here:
| public interface ServerPeerMBean
| {
| // JMX attributes
|
| int getServerPeerID();
|
| String getJMSVersion();
|
| int getJMSMajorVersion();
|
| int getJMSMinorVersion();
|
| String getJMSProviderName();
|
| String getProviderVersion();
|
| int getProviderMajorVersion();
|
| int getProviderMinorVersion();
|
| String getDefaultQueueJNDIContext();
|
| String getDefaultTopicJNDIContext();
|
| void setSecurityDomain(String securityDomain) throws Exception;
|
| String getSecurityDomain();
|
| void setDefaultSecurityConfig(Element conf) throws Exception;
|
| Element getDefaultSecurityConfig();
|
| ObjectName getPersistenceManager();
|
| void setPersistenceManager(ObjectName on);
|
| ObjectName getPostOffice();
|
| void setPostOffice(ObjectName on);
|
| ObjectName getJmsUserManager();
|
| void setJMSUserManager(ObjectName on);
|
| ObjectName getDefaultDLQ();
|
| void setDefaultDLQ(ObjectName on);
|
| ObjectName getDefaultExpiryQueue();
|
| void setDefaultExpiryQueue(ObjectName on);
|
|
| int getQueuedExecutorPoolSize();
|
| void setQueuedExecutorPoolSize(int poolSize);
|
| long getFailoverStartTimeout();
|
| void setFailoverStartTimeout(long timeout);
|
| long getFailoverCompleteTimeout();
|
| void setFailoverCompleteTimeout(long timeout);
|
| int getDefaultMaxDeliveryAttempts();
|
| void setDefaultMaxDeliveryAttempts(int attempts);
|
| long getQueueStatsSamplePeriod();
|
| void setQueueStatsSamplePeriod(long newPeriod);
|
| long getDefaultRedeliveryDelay();
|
| void setDefaultRedeliveryDelay(long delay);
|
| int getDefaultMessageCounterHistoryDayLimit();
|
| void setDefaultMessageCounterHistoryDayLimit(int limit);
|
| // JMX operations
|
| String createQueue(String name, String jndiName) throws Exception;
|
| String createQueue(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception;
|
| boolean destroyQueue(String name) throws Exception;
|
| String createTopic(String name, String jndiName) throws Exception;
|
| String createTopic(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception;
|
| boolean destroyTopic(String name) throws Exception;
|
| Set getDestinations() throws Exception;
|
| List getMessageCounters() throws Exception;
|
| List getMessageStatistics() throws Exception;
|
| String listMessageCountersAsHTML() throws Exception;
|
| void resetAllMessageCounters();
|
| void resetAllMessageCounterHistories();
|
| List retrievePreparedTransactions();
|
| String showPreparedTransactionsAsHTML();
| }
|
| public interface DestinationMBean
| {
| // JMX attributes
|
| String getName();
|
| String getJNDIName();
|
| void setJNDIName(String jndiName) throws Exception;
|
| ObjectName getServerPeer();
|
| void setServerPeer(ObjectName on);
|
| ObjectName getDLQ();
|
| void setDLQ(ObjectName on) throws Exception;
|
| ObjectName getExpiryQueue();
|
| void setExpiryQueue(ObjectName on) throws Exception;
|
| long getRedeliveryDelay();
|
| void setRedeliveryDelay(long delay);
|
| int getMaxSize();
|
| void setMaxSize(int maxSize) throws Exception;
|
| Element getSecurityConfig();
|
| void setSecurityConfig(Element securityConfig) throws Exception;
|
| int getFullSize();
|
| void setFullSize(int fullSize);
|
| int getPageSize();
|
| void setPageSize(int pageSize);
|
| int getDownCacheSize();
|
| void setDownCacheSize(int downCacheSize);
|
| boolean isClustered();
|
| void setClustered(boolean clustered);
|
| boolean isCreatedProgrammatically();
|
| int getMessageCounterHistoryDayLimit();
|
| void setMessageCounterHistoryDayLimit(int limit) throws Exception;
|
| // JMX operations
|
| void removeAllMessages() throws Exception;
|
| }
|
| ublic interface QueueMBean
| {
| // JMX attributes
|
| int getMessageCount() throws Exception;
|
| int getScheduledMessageCount() throws Exception;
|
| MessageCounter getMessageCounter();
|
| MessageStatistics getMessageStatistics() throws Exception;
|
| int getConsumerCount() throws Exception;
|
| // JMX operations
|
| void resetMessageCounter();
|
| void resetMessageCounterHistory();
|
| List listAllMessages() throws Exception;
|
| List listAllMessages(String selector) throws Exception;
|
| List listDurableMessages() throws Exception;
|
| List listDurableMessages(String selector) throws Exception;
|
| List listNonDurableMessages() throws Exception;
|
| List listNonDurableMessages(String selector) throws Exception;
|
| String getMessageCounterAsHTML();
|
| String getMessageCounterHistoryAsHTML();
| }
|
| public interface TopicMBean
| {
| //JMX attributes
|
| int getAllMessageCount() throws Exception;
|
| int getDurableMessageCount() throws Exception;
|
| int getNonDurableMessageCount() throws Exception;
|
| int getAllSubscriptionsCount() throws Exception;
|
| int getDurableSubscriptionsCount() throws Exception;
|
| int getNonDurableSubscriptionsCount() throws Exception;
|
| // JMX operations
|
| void removeAllMessages() throws Exception;
|
| List listAllSubscriptions() throws Exception;
|
| List listDurableSubscriptions() throws Exception;
|
| List listNonDurableSubscriptions() throws Exception;
|
| String listAllSubscriptionsAsHTML() throws Exception;
|
| String listDurableSubscriptionsAsHTML() throws Exception;
|
| String listNonDurableSubscriptionsAsHTML() throws Exception;
|
| List listAllMessages(String subscriptionId) throws Exception;
|
| List listAllMessages(String subscriptionId, String selector) throws Exception;
|
| List listDurableMessages(String subscriptionId) throws Exception;
|
| List listDurableMessages(String subscriptionId, String selector) throws Exception;
|
| List listNonDurableMessages(String subscriptionId) throws Exception;
|
| List listNonDurableMessages(String subscriptionId, String selector) throws Exception;
|
| List getMessageCounters() throws Exception;
| }
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999590#3999590
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999590
19 years, 3 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Scheduled delivery and redelivery delay
by timfox
Scheduled delivery and redelivery delay are now implemented in TRUNK.
Scheduled delivery:
Before sending a message you can set a JBoss specific property - this is the same property name used by JBoss MQ:
| message.setLongProperty("JMS_JBOSS_SCHEDULED_DELIVERY", System.currentTimeMillis() + 30000);
|
Then after the message has successfully reached the queue, delivery will not occur until the specified future time. This could be milliseconds, seconds or months
in the future. If the message is persistent and the message is in a jms queue or durable subscription, then the scheduled delivery will survive a restart.
Clearly scheduled message deliveries do not respect normal message orderings in queues.
Delayed redelivery:
Often it is useful to introduce a delay before redelivery of a message. E.g. if a consumer fails often it may not be desirable to have a message redelivered in quick
succession due to the extra network traffic that might give.
A redelivery delay can be specified for the server which would apply to all destinations. Specific delays can also be specified on a per destination basis which
overrides any value specified at the server level.
Internally, both scheduled delivery and redelivery delay use the same mechanism to delay deliveries.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999588#3999588
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999588
19 years, 3 months