# `PhoenixKit.PubSubHelper`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.165/lib/phoenix_kit/pubsub_helper.ex#L1)

Helper for dynamically resolving the PubSub server to use.

This module provides functions to get the appropriate PubSub server
based on configuration. It will use the configured pubsub from
the parent application.

## Configuration

Configure the PubSub server in your application:

    config :phoenix_kit, pubsub: MyApp.PubSub

If not configured, PhoenixKit will attempt to derive it from the
parent app name (e.g., MyApp -> MyApp.PubSub).

# `broadcast`

Broadcasts a message to a topic using the configured PubSub server.

# `broadcast`

Broadcasts a message using a specific PubSub server.

# `pubsub`

Gets the PubSub server module to use.

Returns the configured pubsub server, or derives it from parent_module config.

# `pubsub_from_socket`

Gets the PubSub server from socket endpoint config.

This is useful in LiveView contexts where the socket has access to
the endpoint configuration.

# `subscribe`

Subscribes to a topic using the configured PubSub server.

# `subscribe`

Subscribes to a topic using a specific PubSub server.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
