use of com.hazelcast.security.permission.ConnectorPermission in project hazelcast by hazelcast.
the class SourceProcessors method streamJmsTopicP.
/**
* Returns a supplier of processors for {@link Sources#jmsTopicBuilder}.
*
* @param isSharedConsumer true, if {@code createSharedConsumer()} or
* {@code createSharedDurableConsumer()} was used to create the
* consumer in the {@code consumerFn}
* @param maxGuarantee maximum processing guarantee for the source. You can
* use it to disable acknowledging in transactions to save transaction
* overhead
*/
@Nonnull
public static <T> ProcessorMetaSupplier streamJmsTopicP(@Nullable String destination, boolean isSharedConsumer, @Nonnull ProcessingGuarantee maxGuarantee, @Nonnull EventTimePolicy<? super T> eventTimePolicy, @Nonnull SupplierEx<? extends Connection> newConnectionFn, @Nonnull FunctionEx<? super Session, ? extends MessageConsumer> consumerFn, @Nonnull FunctionEx<? super Message, ?> messageIdFn, @Nonnull FunctionEx<? super Message, ? extends T> projectionFn) {
ProcessorSupplier pSupplier = new StreamJmsP.Supplier<>(destination, maxGuarantee, eventTimePolicy, newConnectionFn, consumerFn, messageIdFn, projectionFn);
ConnectorPermission permission = ConnectorPermission.jms(destination, ACTION_READ);
return isSharedConsumer ? ProcessorMetaSupplier.preferLocalParallelismOne(permission, pSupplier) : ProcessorMetaSupplier.forceTotalParallelismOne(pSupplier, newUnsecureUuidString(), permission);
}
Aggregations