While string works well in many cases as data for both events and queues, I prefer a cluster of a type def'd enum of commands and a variant for data. I make 2 helper VI's, Enqueue and Dequeue which handles the (un)bundling so only the Enum and Variant is exposed. That way cases and commands automatically get the right command and I can send whatever data I need to/from the command.
- Just an Init? Ignore the variant input.
- Message? Connect a string to the variant.
- Setup? Send a cluster of information.
and so on.
Although I do need some Variant to Data in the Consumer, that's a small price to pay.
Technically it's also slightly faster, as a case driven by a Enum is an integer, while the string requires string comparison (and 'to upper case'-functionality in case of 'case insensitive'). That factor is often negligible, but it feels good knowing I've chosen the (every so slightly) faster option. 😉
/Y