vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Normal FinalizerUpdate 53m kafkasource-controller Updated "mykafkasubscription" finalizers
* To update an event subscription with the CLI, use the [ibmcloud ce subscription kafka update](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-subscription-kafka-update) command. The following example updates the topic name.

ibmcloud ce sub kafka update -n mykafkasubscription --topic kafka-topic2

You can use the [ibmcloud ce subscription kafka update](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-subscription-kafka-update) command to update the values for the Kafka subscription. However, you cannot modify the value for the consumer group with this command. If you want to update the subscription to reference a different topic, make sure that the Kafka topic exists before you update the subscription.









 Deleting a Kafka event subscription 

When you no longer need a Kafka subscription, you can delete it.



 Deleting a Kafka subscription from the console 



1. From the [Code Engine Projects page](https://cloud.ibm.com/codeengine/projects), go to your project.
2. From the Overview page, click Event subscriptions to view a listing of defined subscriptions.
3. From the list of subscriptions, delete the subscription that you want to remove from your application or job.



If you delete an app or a job that is associated with the subscription, the subscription is not deleted. If you re-create the application or job (or another app or job with the same name), your subscription reconnects with the app or job.





 Deleting a Kafka subscription with the CLI
See [IaaS endpoints](https://cloud.ibm.com/docs/vpc?topic=vpc-service-endpoints-for-vpcinfrastructure-as-a-service-iaas-endpoints) for more information.

You need to attach to the Transit Gateway if you want to connect your workspace with the VPC and classic infrastructure.





 Attaching Transit Gateway to a PER workspace 

Transit Gateway is required to connect with VPC and classic infrastructure. To attach a virtual server instance from a PER workspace with Transit Gateway, complete the steps that are mentioned in [Ordering IBM Cloud Transit Gateway](https://cloud.ibm.com/docs/transit-gateway?topic=transit-gateway-ordering-transit-gateway&interface=ui)

Select Power Systems Virtual Server under connection to attach a virtual server instance that was created on a PER enabled workspace. You can also add VPC and Classic infrastructures as connection.

The multiple connections that you add under Transit Gateway can ping each other. For example, if you add a Power Systems Virtual Server workspace and VPC under Transit Gateway connection, they both can access each other resource.

Make sure that the classic infrastructure is Virtual Routing and Forwarding (VRF) enabled before you attach it to the Transit Gateway.







 OS support in a PER workspace 

AIX, IBM i, and Linux operating systems are supported in a PER workspace.



 AIX and IBM i support on PER 

AIX and IBM i operating systems operate in PER workspaces in the same way that they do in non-PER workspaces.





 Full Linux Subscription with PER 

See [Full Linux® subscription for Power Systems Virtual Servers](https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-set-full-Linux) for Power Systems Virtual Server to register RHEL84, SLES SP2, SLES SP3 images on a non-PER workspace.

Full Linux subscription RHEL86 and SLES15 SP4 images can be used in a PER workspace. Follow these instructions for a PER-enabled workspace to let the virtual server instance automatically register a full Linux subscription:



1. Create a private network.



1.
[Logging in to a RHCOS host machine to debug](https://cloud.ibm.com/docs/satellite?topic=satellite-ts-hosts-login-rhcosts-hosts-login-rhcos)



* [Machine cannot be reached on the network](https://cloud.ibm.com/docs/satellite?topic=satellite-ts-hosts-login-rhcosts-hosts-login-cannot-reach-rhcos)



[Why can't I SSH into my host machines?](https://cloud.ibm.com/docs/satellite?topic=satellite-ssh-login-deniedssh-login-denied)

[Why aren't my hosts attaching to my location?](https://cloud.ibm.com/docs/satellite?topic=satellite-host-not-attachinghost-not-attaching)

[Why does the host registration script fail?](https://cloud.ibm.com/docs/satellite?topic=satellite-host-registration-script-failshost-registration-script-fails)

[Why can't I assign hosts to a cluster?](https://cloud.ibm.com/docs/satellite?topic=satellite-assign-failsassign-fails)



* [Debugging hosts for connectivity issues](https://cloud.ibm.com/docs/satellite?topic=satellite-assign-failsdebug-host-connectivity)
* [Endpoints to verify connectivity by IBM Cloud multizone metro](https://cloud.ibm.com/docs/satellite?topic=satellite-assign-failsendpoints-to-verify)



[Why does host assign fail with a CRI-O error?](https://cloud.ibm.com/docs/satellite?topic=satellite-host-assign-file-systemhost-assign-file-system)

[Why can't I reuse a host in a different Satellite location?]
These IDs classify the SMS as transactional, and is not blocked by the operator.



* The user opts out. If the user opts out from messaging by sending opt-out text like Opt Out, Stop, or Exit, then messages do not reach that user and the status report states that. The user can send an Opt in message to the same source to restart receiving messages.



* Why do some devices are marked invalid and deleted from database?

Sometimes the devices are marked invalid and deleted from database, if they meet these invalid conditions:



* FCM or Android devices:



* invalidRegistration - might be due to incorrect registration token format passed to the server.
* MismatchSenderID - a mismatch in the senderID who is not part of the user group that is tied to a registration token.
* NotRegistered - an invalid registration token due to various reasons (like client app getting unregistered with FCM, tokens are invalid, registration token expires, client app that is updated but the new version that is not configured to receive messages).



For more information, see [FCM error response codes for downstream messages](https://firebase.google.com/docs/cloud-messaging/http-server-referror-codes).
* APNS or Safari devices:



* Unregistered - the device token is not active for the specified topic.
* BadDeviceToken - the specified device token is invalid.
* DeviceTokenNotForTopic - the device token doesn’t match the specified topic (bundle ID).



For more information on how to handle notification responses from apps, see [here](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/handling_notification_responses_from_apns).
* Chrome or Firefox devices:



* NotFound - the subscription is expired and can’t be used.
* Gone - the subscription is no longer valid.



For more information, see [web push protocol](https://web.dev/push-notifications-web-push-protocol/).
When your Kafka subscription is created with a broker, topics and an access secret that are valid, and you have a Kafka job that produces messages on that topic (such as kafka-sender-app), then you can see events in logs for your Code Engine job that receives Kafka messages, such as kafka-receiver-job. When you use the Kafka receiver job (icr.io/codeengine/codeengine), search for CE_DATA in the logs for the receiver job to see the messages that are received.







 Subscribing to Kafka events for a job with the CLI 

You can use the CLI to set up a Kafka event subscription so that events are sent to a Code Engine job.

When you create an event subscription for a job, a job run is created for each event that is triggered. This job run has the environment variables that are related to the job. The Code Engine Kafka event subscription connects to your Kafka message broker and sends environment variables that are related to the job. For more information about the environment variables that are sent by Kafka, see [Environment variables for events](https://cloud.ibm.com/docs/codeengine?topic=codeengine-working-kafkaevent-producersubkafka-envvar-job).



 Creating a Code Engine job to receive Kafka events with the CLI 

Before you begin



* [Set up your Code Engine CLI environment](https://cloud.ibm.com/docs/codeengine?topic=codeengine-install-cli).
* [Create and work with a project](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-project).





1. [Create an Code Engine job](https://cloud.ibm.com/docs/codeengine?topic=codeengine-create-jobcreate-job-ui) to act as an event consumer of Kafka messages and receive the Kafka events.
3. From the list of subscriptions, delete the subscription that you want to remove from your application or job.



If you delete an app or a job that is associated with the subscription, the subscription is not deleted. If you re-create the application or job (or another app or job with the same name), your subscription reconnects with the app or job.





 Deleting a Kafka subscription with the CLI 

You can delete a Kafka subscription by running the [ibmcloud ce subscription kafka delete](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-subscription-kafka-delete) command.

For example, use the following command to delete a Kafka subscription that is called mykafkasubscription,

ibmcloud ce subscription kafka delete --name mykafkasubscription

If you delete an app or a job that is associated with the subscription, the subscription is not deleted. Instead, it moves to ready state of false because the subscription depends on the availability of the app or job. If you re-create the application or job (or another app or job with the same name), your subscription reconnects and the Ready state is true.







 Defining additional event attributes 

When you create a subscription, you can define additional CloudEvent attributes to be included in any events that are generated. These attributes appear similar to any other CloudEvent attribute in the delivery of the event. If you choose to specify the name of an existing CloudEvent attribute, then it overrides the original value that was included in the event.

To define addition attributes, use the --extension options with the [ibmcloud ce subscription kafka create](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-subscription-kafka-create) CLI command.

For more information, see [Can I use other CloudEvents specifications?](https://cloud.ibm.com/docs/codeengine?topic=codeengine-subscribing-eventssubscribing-events-cloudevents)
Working with the IBM Cloud Object Storage event producer 

The IBM Cloud Object Storage subscription listens for changes to an Object Storage bucket. When you create a subscription to a bucket, your app or job receives a separate event for each successful change to that bucket. You can subscribe to different events such as write events, delete events, or all events. You can create at most 100 Object Storage subscriptions per project.



 Setting up the IBM Cloud Object Storage event producer 

To get started, you must [create an IBM Cloud Object Storage service instance](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-gs-devgs-dev-provision) and [create a regional bucket](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-getting-started-cloud-object-storagegs-create-buckets) in one of the supported regions for Code Engine.

Your Object Storage bucket must be a regional bucket that is located in the same region as your Code Engine project. Cross-region and single-site buckets are not supported. For more information about setting up the IBM Cloud Object Storage event producer, see [Getting started with Object Storage](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-getting-started-cloud-object-storage).

If your application or job that is receiving events wants to talk to a service by using private networking and the service has both private and direct endpoints (such as IBM Cloud Object Storage), then the direct endpoints must be used.





 Assigning the Notifications Manager role to Code Engine 

Before you can create an Object Storage subscription, you must assign the Notifications Manager role to Code Engine. As a Notifications Manager, Code Engine can view, modify, and delete notifications for an Object Storage bucket.

Only account administrators can assign the Notifications Manager role.

When you assign the Notifications Manager role to your project, you can then create event subscriptions for any regional buckets in your Object Storage instance that are in the same region as your project.



1.
Configuring the app to always have a running instance is useful when you view logs. If you are running in a production environment, consider the cost of keeping a running instance of your app or whether you want Code Engine to autoscale to zero. By default, the app scales to zero when not in use.

ibmcloud ce app create -n kafka-receiver-app2 --image icr.io/codeengine/kafka-receiver --min-scale 1

By default, events are routed to the root URL of the destination application. You can send events to a different destination within the app by using the --path option. For example, if your subscription specifies --path /event, the event is sent to https://<base application URL>/events.
2. After you deploy this app, run the app get command to confirm that the app is in ready status.

ibmcloud ce app get -n kafka-receiver-app2







 Creating a Code Engine Kafka event subscription for an app with the CLI 

You can create a Kafka event subscription, which defines the relationship between the Kafka producer (sender) and consumer (receiver) of events, with the CLI.



1. Create a Code Engine Kafka event subscription for your Kafka events by using the [ibmcloud ce sub kafka create](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-subscription-kafka-create) command. Use the kafka-subscription-secret secret that you previously created to access the message broker. Specify the broker information based on the service credentials information for your Kafka resource. For this example, you can obtain the broker information from the output of the ibmcloud resource service-key myeventstream-key command. Notice that you must specify a --broker option for each broker for your topic. The --destination option specifies the Code Engine resource that receives the events.
Consumers of Kafka messages can be grouped into [consumer groups](https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-consuming_messagesconsumer_groups). If you are using consumer groups, the topic configuration controls the message flow to consumers in the consumer group. Whenever a consumer is added to or removed from a consumer group, the message flow from that topic might change. This action can cause existing consumers to no longer receive messages from that topic.
5. Click Next to proceed.



7. For Event consumer, specify the Code Engine job to receive events. Notice that you can choose from a list of defined jobs and apps, or you can provide a name for a job (or app) that is not yet created. It is not necessary that the app or job exist when you create the event subscription with the console. However, when the subscription is created, the status of the subscription reflects that the consumer does not exist. You must create the job (or app) before the subscription is in a ready state and can receive events through this subscription. For this example, select job as the component type, and use the kafka-receiver-job job that references the icr.io/codeengine/codeengine image as the component to receive events. If your job does not exist, provide the name of your job and [create your job](https://cloud.ibm.com/docs/codeengine?topic=codeengine-create-jobcreate-job-ui) after you create the Kafka subscription. For applications only, you can optionally specify a path. Click Next to proceed.
8. For Summary, review the settings for your Kafka event subscription and make changes, if needed. When ready, click Create to create the Kafka subscription.







 Sending events to the receiving job from the console 

Now that your Kafka event subscription, which references the kafka-receiver-job job, is created, use the kafka-sender-app to send message events to the receiver job.



1.
Using RHEL within the Power Systems Virtual Server 

You can deploy a Linux® virtual machine (VM) using one of the IBM stock OS images, or you can bring your own Linux image (in OVA format).

You can choose from the following options:



* Register for a full Linux subscription.
* Use your own Linux subscription from a Linux vendor.



If you choose to register for full Linux subscription, an additional charge will apply to your provisioned VM for Linux support through IBM. Full Linux subscription requires use of one of the stock operating system images provided by IBM. In the image menu, select IBM provided subscription to choose one of the IBM stock images. For more information on how to provision and register using a full Linux subscription, see [Full Linux subscription for Power Systems Virtual Server](https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-set-full-Linux).

If you choose to provision a Linux VM with your own subscription, select Linux – Client supplied subscription. In the image menu, select your custom image. For more information, see [how to deploy a custom image with Power Systems Virtual Server](https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-deploy-custom-image).

The Power Systems Virtual Server provides Linux (RHEL and SLES) stock images for SAP and non-SAP applications. The following versions of RHEL are supported:



* RHEL8.4 for SAP HANA (RHEL8-SP4-SAP)
* RHEL8.4 for SAP NetWeaver (RHEL8-SP4-SAP-NETWEAVER)
* RHEL 8.4 general purpose (RHEL8-SP4)
* RHEL 8.6 general purpose (RHEL8-SP6)
* RHEL8.6 for SAP HANA (RHEL8-SP6-SAP )
* RHEL8.4 for SAP NetWeaver (RHEL8-SP6-SAP-NETWEAVER)
For more information about the environment variables that are sent by Kafka, see [Environment variables for events](https://cloud.ibm.com/docs/codeengine?topic=codeengine-working-kafkaevent-producersubkafka-envvar-job).



 Creating a Code Engine job to receive Kafka events from the console 



1. [Create an Code Engine job](https://cloud.ibm.com/docs/codeengine?topic=codeengine-create-jobcreate-job-ui) to act as an event consumer of Kafka messages and receive the Kafka events. For example, create a job that is called kafka-receiver-job that uses the sample icr.io/codeengine/codeengine image. This image is built from codeengine.go, available from the [Samples for IBM Cloud Code Engine GitHub repo](https://github.com/IBM/CodeEngine). This sample does not require any environment variables.
2. After you create this job, confirm that it is in ready status.



When you use the console, it is not necessary that the app or job that you use to receive Kafka events exist before you create the Kafka event subscription. However, if the app or job does not exist when you create the event subscription, the status of the subscription reflects that the consumer does not exist. You must create the app or job before the subscription is in a ready state and can receive events through this subscription.





 Creating a Code Engine Kafka event subscription for a job from the console 

The Kafka event subscription defines the relationship between the Kafka producer (sender) and consumer (receiver) of events.

Before you begin



* Determine the Code Engine project that you want to use and make sure that this project is selected. See [Create and work with a project](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-project).



Complete the following steps to create a Kafka event subscription for an application from the console.



1.
2022/03/31 22:19:46 Header: X-Request-Id=[abcdeb4e-c5ac-abcd-abcd-60e6278abcde]
2022/03/31 22:19:46 Event data: test1: 1

Note that log information for apps lasts for only one hour. For more information about viewing logs for apps (or jobs), see [Viewing logs](https://cloud.ibm.com/docs/codeengine?topic=codeengine-view-logs).











 Setting up Code Engine to receive Kafka events for a job 

For Code Engine to work with Kafka events, use the console or CLI to set up a Code Engine Kafka eventing subscription to connect to Kafka event brokers and listen for Kafka events. Also, set up a Code Engine job (or app) to act as the receiver of the Kafka events. The Kafka event subscription defines the relationship between the Kafka producer (sender) and consumer (receiver) of events.



 Subscribing to Kafka events for a job from the console 

You can use the console to set up a Kafka event subscription so that events are sent to a Code Engine job.

When you create an event subscription for a job, a job run is created for each event that is triggered. This job run has the environment variables that are related to the job. The Code Engine Kafka event subscription connects to your Kafka message broker and sends environment variables that are related to the job. For more information about the environment variables that are sent by Kafka, see [Environment variables for events](https://cloud.ibm.com/docs/codeengine?topic=codeengine-working-kafkaevent-producersubkafka-envvar-job).



 Creating a Code Engine job to receive Kafka events from the console 



1. [Create an Code Engine job](https://cloud.ibm.com/docs/codeengine?topic=codeengine-create-jobcreate-job-ui) to act as an event consumer of Kafka messages and receive the Kafka events.
Can I stop my app? 

  What’s happening 

You want to stop your app to prevent it from receiving traffic.

  Why it’s happening 

You can stop your app by setting your app visibility to project and allowing it to scale to 0.

  How to fix it 

To prevent traffic from reaching your app, follow these steps.



1.  Change the minimum scale of the app to 0. For more information, see [Setting the number of minimum and maximum instances for your app](https://cloud.ibm.com/docs/codeengine?topic=codeengine-app-scalescale-app-min-max).
2.  Change the visibility of the app to project so that your app is not accessible from the public internet and network access is possible only from other Code Engine components that are running in the same project. For more information, see [Deploying your app with a project endpoint](https://cloud.ibm.com/docs/codeengine?topic=codeengine-application-workloadsapp-endpoint-projectonly).
3.  Remove any custom domain mapping from your app. For more information, see [Deleting domain mappings](https://cloud.ibm.com/docs/codeengine?topic=codeengine-domain-mappingsdelete-custom-domain).
4.  Remove any event subscriptions that target the app. For more information, see [Getting started with subscriptions](https://cloud.ibm.com/docs/codeengine?topic=codeengine-subscribing-events). You can find information about your subscriptions by looking in the console or by running the sub get for each subscription.
5.  Check your source code to make sure that traffic between components in the Code Engine project does not target the application.



When you complete these steps, your app does not receive traffic and scales to zero. Your app can be restarted at any time by reverting these steps.