Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed wrong alias for QueueConsumer waitingTime #54

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
public @interface QueueConsumer {

/**
* Allows to override the default name of the job which is <code>JobClassName</code> if there is only one executable
* method (e.g. job definition) in the class or <code>JobClassName-methodName</code> if there is more then one executable method in the class.
* <p>
* Either the job name specified here or the default name is converted using {@link io.micronaut.core.naming.NameUtils#hyphenate(String)}.
*
* @return the name of the job used for configuration
*/
@AliasFor(annotation = Named.class, member = "value")
String name() default "";

/**
* @return the name of the work queue to consume items from
*/
Expand All @@ -57,7 +68,7 @@
* The time to wait for the next message to be available and also the time to wait for the next run.
* @return the maximum waiting time as duration string
*/
@AliasFor(annotation = Consumes.class, member = "value")
@AliasFor(annotation = Consumes.class, member = "waitingTime")
@AliasFor(annotation = FixedRate.class, member = "value")
String waitingTime() default "";

Expand All @@ -70,7 +81,10 @@
int maxMessages() default JobConfiguration.ConsumerQueueConfiguration.DEFAULT_MAX_MESSAGES;

/**
* @return The name of a {@link Named} bean that is a
* The name of the task executor to use to execute the job. If default value is usd then new scheduled executor
* is created for each job with the number of threads equal to the fork value.
*
* @return The name of a {@link jakarta.inject.Named} bean that is a
* {@link java.util.concurrent.ScheduledExecutorService} to use to schedule the task
*/
@AliasFor(annotation = Job.class, member = "scheduler")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.agorapulse.worker.annotation.Job;
import com.agorapulse.worker.annotation.Produces;
import io.micronaut.context.annotation.AliasFor;
import jakarta.inject.Named;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
Expand Down Expand Up @@ -50,6 +51,12 @@
*
* @return the name of the job used for configuration
*/
@AliasFor(annotation = Named.class, member = "value")
String name() default "";

/**
* @return the name of the work queue to produce items to
*/
@AliasFor(annotation = Produces.class, member = "value")
String value() default "";

Expand Down
Loading