Implement the ArtemisProvisioningProvider class that implements the ProvisioningProvider interface for managing producer and consumer destinations in an Artemis messaging environment.
You need to ensure that the class provides methods to provision destinations based on whether the producer properties are partitioned or unpartitioned.
Input/Output Requirements:
Constructor:
Input:
ArtemisBrokerManager artemisBrokerManager: An instance of the ArtemisBrokerManager to manage broker-related tasks.
Output:
The constructor does not return anything but should initialize the provider with the given broker manager.
provisionProducerDestination Method:
Input:
String address: The address for the producer destination.
ExtendedProducerProperties<ArtemisProducerProperties> properties: The properties of the producer, which may include partitioning information.
Output:
Return a ProducerDestination object, which represents the provisioned producer destination.
String address: The address for the consumer destination.
String group: The group name for the consumer.
ExtendedConsumerProperties<ArtemisConsumerProperties> properties: The properties of the consumer.
Output:
Return a ConsumerDestination object, which represents the provisioned consumer destination.
Behavior: The implementation details for this method should be defined according to the project's requirements for consumer destination provisioning.
Location:
Place the solution in the /app/ directory of the project.
Note:
Be sure to handle any potential exceptions that may arise during the provisioning process, particularly related to invalid properties or broker-related issues. Ensure the code is well-documented and adheres to the project's coding standards.