I am trying to write an Application that uses the JMS publish subscribe model. However I have run into a setback, I want to be able to have the publisher delete messages from the topic. The usecase is that I have durable subscribers, the active ones will get the messages (since it's more or less instantly) , but if there are inactive ones and the publisher decides the message is wrong, I want to have him able to delete the message so that the subscribers won't receive it anymore once they become active. Problem is, I don't know how/if this can be done. For a provider I settled on glassfish's implementation, but if other alternatives offer this functionality, I can switch.
JMS is a form of asynchronous messaging and as such the publishers and subscribers are decoupled by design. This means that there is no mechanism to do what you are asking. For subscribers who are active at time of publication, they will consume the message with no chance of receiving the delete message in time to act on it. If a subscriber is offline then they will but async messages are supposed to be atomic. If you proceed with design of other respondent's answer (create a delete message and require reconnecting consumers to read the entire queue looking for delete messages), then you will create a situation in which the behavior of the system differs based on whether or not a subscriber was online or not at the time a specific message/delete combination was was published. There is also a race condition in which the subscriber completes reading of the retained messages just before the publisher sends out the delete message. This means you must put significant logic into subscribers to reconcile these conditions and even more to reconcile the race condition.
The accepted method of doing this is what are called "compensating transactions." In any system where the producer and consumer do not share a single unit of work or share common state (such as using the same DB to store state) then backing out or correcting a previous transaction requires a second transaction that reverses the first. The consumer must of course be able to apply the compensating transaction correctly. When this pattern is used the result is that all subscribers exhibit the same behavior regardless of whether the messages are consumed in real time or in a batch after the consumer has restarted.
Note that a compensating transaction differs from a "delete message." The delete message as proposed in the other respondent's answer is a form of command and control that affects the message stream itself. On the other hand, compensating transactions affect the state of the system through transactional updates of the system state.
As a general rule, you never want to manage state of the system by manipulating the message stream with command and control functions. This is fragile, susceptible to attack and very hard to audit or debug. Instead, design the system to deliver every message subject to its quality of service constraints and to process all messages. Handle state changes (including reversing a prior action) entirely in the application.
JMS API does not allow removing messages from any destination (either queue or topic). Although I believe that specific JMX providers provide their own proprietary tools to manage their state for example using JMX. Try to check it out for your JMS provider but be careful: even if you find solution it will not be portable between different JMS providers.
But this person has access to your iCloud account? You have a lot more at risk than your messages. But anyway, go to Settings/Messages. Tap on Text message forwarding. turn off your Mac. This may not work for iMessages, however; I've never tried. The best I can suggest is change your iCloud password. And turn off iMessage.
No, Text message forwarding should be right after the iMessage on/off switch. It should show next to it how many devices are receiving messages. As I said, I think this just applies to SMS, not iMessage, but I'm not sure. You should also try ManSinha's suggestion.
I'm trying to delete specific messages from an MSMQ message queue using PowerShell. I'm aware that several new cmdlets for managing MSMQ queues & messages were introduced in PowerShell 4+, but from what I can tell, these still don't help me achieve my goal of deleting specific messages.
What I'm trying to achieve is a simple script that connects to a specified queue, then loops through every message in that queue, looks for a specified search string in the message body, and then MOVES any matching messages to another queue on the same server. I have this working very nicely for searching messages, and can COPY any matching using using the Send method:
But - once copied, my only option to delete the original message from the source queue seems to be purging the entire source queue, which will delete all other messages as well, which I don't want to do!
But I'm struggling to get this to work - I'm unclear if I can pass it specific message objects to move. Can anyone give me a working example of using PowerShell (any version) to loop through messages in a queue and move specific messages using this Move-MsmqMessage cmdlet?
If you want to group items by Conversation, select the View menu, then check the box for Show as Conversations. For more information about conversations, see view email messages by conversation.
I had the power to a houseful of wired Nest Protects go out while I was away. I was gone for 3-4 days, and each of the 4 Protects sent a message every. single. minute. Now my app has thousands of useless messages and I'm having to delete each of them. One. At. A. Time.
Same issue. Now it wants to make my schedule more efficient for Seasonal Savings. I didn't ask for any of this advice. My schedule is my schedule thanks! Perhaps I need to consider another product. I'm really tired of shoddy programming where these devices start eating up your time with advice you didn't ask for and messages you DON'T want.
Has anyone felt like messaging slows down the quick actions the Apple Watch was meant to have? There isn't a delete all function, nor is there a function that creates continuity between your phone and watch when you delete messages. I would like for them to be erased from all of my devices when I delete from either SOURCE. Instead I get the exhausted arm holding it up for ten minutes deleting messages . At least make this optional!!!!!
I coudn't agree more. I put it in a suggestion with watchOS 2.0 and it was closed. It would be great to have a sync between iOS and watchOS when it came to messages. Delete on one, it deletes on the other. How hard could that be?
With verson 2.0 of the WatchOS, I noticed that even though I set my iCloud account to delete messages after 30 days, they would remain past that time on my iWatch. I am waiting to see if they fixed this in WatchOS 3.0
I filed an ER early 2.0 beta days regarding how tedious it was/is to maintain messages on the Watch. It was almost immediately declined. I don't understand why it's so easy to delete a mail message, but such a challenge to delete a text/iMessage.
I've also had postings get closed also with the claim of being a duplicate! This one is really a fix I'd love to have fixed sooner rather than two more OS upgrades. Even a toggle to stop messages going to the watch completely.
What you probably heared and got confused with was, that the apple watch cannot connect directly to services and download content, it requries to tether to the iPhone / known WiFi in order to connect. But once connected, messages are stored on the watch itself.
for hours I'm now trying to find a way to delete messages from a JMS queue. I'm looking for someting like "deleteAllMessages" which was (obviously) available through the jmx console. But since there is no jmx console in AS7 any longer, all the information one can find in the internet is useless. I did already take a look in the management console up and down, start the jconsole and the cli, but nowhere there is a way to manage the queues. Is this something which is just not ready yet in AS7 or has it been forgotten or is there just another brilliant way how to manage the queues and delete the messages in it which is not documented (or I didn't find)?
I haven't checked the admin console to see if it exposes this operation, but the management APIs of messaging subsystem does expose it and it's available in the CLI. Start the server with messaging subsystem (ex: the standalone-full.xml) and using the CLI you can see the remove-messages operation description:
In the admin-application I could see that there are about 2656 messages in queue and the same amount in delivery. So the conclusion is: The "remove-messages" method will not delete messages which are "in delivery". But actually I want to delete this messages or, in other words, stop the processing of any message in the queue at all. So the question is, if "remove-messages" is really what I'm looking for or if there is something like "stop-the-processing-of-any-message-in-the-queue-whether-they-are-in-delivery-or-not". :-)
Messages which are being delivered have been received by a consumer but have not yet been acknowledged. There is no way to recall these messages from clients, and I don't believe you'd want to since it is the consumer's prerogative to receive a message and then acknowledge it after it is finished processing it.
Hm. Yes, I understand. But the situation is the following: I have started the client and have delivered about 15'000 messages to the queue. Immediately, all the messages's status went to "in delivery". The beans in this case just had a small test method which had a timeout of five seconds. Beside that it took a very long time for the 15'000 messages to be delivered, nothing bad happend.
But in a real world situation this could have been emails. Or delete statements. Or, or or....and if the messages were created by error, if I understood you right, there is no way to stop the delivery of the, say, 15'000 messages in any way and every single email, every single select would have been delivered.
aa06259810