Command Pattern with Undo , returning response in Invoker and Command class or Callback?
Excellent "by the book" realization of the command pattern with undo/redo ;)

Just 2 comments:


If receiver changes the state of the database, I would definitively handle the error case - the current implementation seems to ignore it. Imagine that undo fails (group was not deleted) and the previous command created the subscription. Then another undo (which tries to delete the subscription) also fails because there is still a group referencing the subscription.
Maybe it is a matter if taste, but I don't see a case where the implementation of execute and redo differs. Usually, I use only 2 methods do and undo where do will be used for execute as well as redo.





  Having Invoker and Command to return boolean indicating success or
  failure feels better. I have seen an example where they use callbacks.
  Is this something only for asynchronous operations or I can also use
  it here? Which would be better?


If a boolean (without error message) is enough, I would prefer the boolean return value because of its simplicity. Otherwise, I would even prefer something like an ErrorInfo object that contains a success flag and an optional error message (or even other information like the exception) as return value.

Another option is to throw an exception - may be also valid in your case. For that kind of error handling, the command should be executed before being pushed to the undoStack obviously.