63887ea84d
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.58 to 14.14.32. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Fredrik Adelöw <freben@gmail.com>
Kafka Plugin
Setup
- Run:
yarn add @backstage/plugin-kafka @backstage/plugin-kafka-backend
- Add the plugin backend:
In a new file named kafka.ts under backend/src/plugins:
import { createRouter } from '@backstage/plugin-kafka-backend';
import { PluginEnvironment } from '../types';
export default async function createPlugin({
logger,
config,
}: PluginEnvironment) {
return await createRouter({ logger, config });
}
And then add to packages/backend/src/index.ts:
// ...
import kafka from './plugins/kafka';
// ...
async function main() {
// ...
const kafkaEnv = useHotMemoize(module, () => createEnv('kafka'));
// ...
const apiRouter = Router();
// ...
apiRouter.use('/kafka', await kafka(kafkaEnv));
// ...
- Add the plugin frontend to
packages/app/src/plugin.ts:
export { plugin as Kafka } from '@backstage/plugin-kafka';
- Register the plugin frontend router in
packages/app/src/components/catalog/EntityPage.tsx:
import { Router as KafkaRouter } from '@backstage/plugin-kafka';
// Then, somewhere inside <EntityPageLayout>
<EntityPageLayout.Content
path="/kafka/*"
title="Kafka"
element={<KafkaRouter entity={entity} />}
/>;
- Add broker configs for the backend in your
app-config.yaml:
kafka:
clientId: backstage
clusters:
- name: cluster-name
brokers:
- localhost:9092
- Add
kafka.apache.org/consumer-groupsannotation to your services:
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
# ...
annotations:
kafka.apache.org/consumer-groups: cluster-name/consumer-group-name
spec:
type: service
Features
- List topics offsets and consumer group offsets for configured services.