此内容没有您所选择的语言版本。

Chapter 24. Providing a custom class to your business application in Business Central


To interact with Red Hat AMQ Streams, your business application requires a custom class in the following cases:

  • You want to use a custom message format for sending or receiving messages using message events.
  • You want to use a custom serializer class for the KafkaPublishMessages custom task.

To use a custom class in your business application, use Business Central to upload the source code and configure the class.

Alternatively, if you deploy your application on SpringBoot, you can compile the classes separately and include them in the class path. In this case, do not complete this procedure.

Procedure

  1. Prepare Java source files with the required custom classes, for example, MyCustomSerializer. Use the package name for your space and project, for example, com.myspace.test.
  2. In Business Central, enter your project and select the Settings Dependencies tab.
  3. Add any dependencies that your custom classes require, for example, org.apache.kafka.kafka-clients.
  4. Select the Assets tab.
  5. For each of the class source files, complete the following steps:

    1. Click Import Asset.
    2. In the Please select a file to upload field, select the location of the Java source file for the custom serializer class.
    3. Click Ok to upload the file.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.