# Topic (dapr-sdk-parent 1.10.0 API)

Package io.dapr

## Annotation Type Topic

    @Documented
    @Target(METHOD)
    @Retention(RUNTIME)
    public @interface Topic

### Required Element Summary

Required Elements
`String` `name` Name of topic to be subscribed to.
`String` `pubsubName` Name of the pubsub bus to be subscribed to.

### Optional Element Summary

Optional Elements
`String` `deadLetterTopic` Name of dead letter topic to forward undeliverable messages.
`String` `metadata` Metadata in the form of a json object.
`Rule` `rule` The rules used to match the incoming cloud event.

### Element Detail

#### name

    String name

Name of topic to be subscribed to.

Returns:
  Topic's name.

#### pubsubName

    String pubsubName

Name of the pubsub bus to be subscribed to.

Returns:
  pubsub bus's name.

#### rule

    Rule rule

The rules used to match the incoming cloud event.

Returns:
  the CEL expression.

Default:
  @io.dapr.Rule(match="", priority=0)

#### metadata

    String metadata

Metadata in the form of a json object. { "mykey": "myvalue" }

Returns:
  metadata object

Default:
  "{}"

#### deadLetterTopic

    String deadLetterTopic

Name of dead letter topic to forward undeliverable messages.

Returns:
  dead letter topic's name.

Default:
  ""